121 lines
1.9 KiB
Markdown
121 lines
1.9 KiB
Markdown
---
|
|
created: 2024-04-28T01:08:15.643Z
|
|
type: note
|
|
updated: 2024-08-05T21:16:56.832Z
|
|
---
|
|
|
|
# PhotoPrism
|
|
|
|
```bash
|
|
wsl --export Ubuntu Ubuntu-PhotoPrism.tar
|
|
wsl --export Ubuntu-PhotoPrism Ubuntu-systemd.tar
|
|
wsl --export Ubuntu-PhotoPrism Ubuntu-Broken-Admin.tar
|
|
wsl --unregister Ubuntu-PhotoPrism
|
|
wsl --import Ubuntu-PhotoPrism Ubuntu-PhotoPrism Ubuntu-systemd.tar
|
|
```
|
|
|
|
```bash
|
|
exit
|
|
wsl --shutdown
|
|
apt-get install mariadb-server -y
|
|
mysql_secure_installation
|
|
https://docs.photoprism.app/getting-started/advanced/databases/
|
|
mariadb
|
|
> CREATE DATABASE photoprism CHARACTER SET = 'utf8mb4' COLLATE = 'utf8mb4_unicode_ci';
|
|
> CREATE USER 'photoprism'@'%' IDENTIFIED BY 'insecure';
|
|
> GRANT ALL PRIVILEGES ON photoprism.* to 'photoprism'@'%';
|
|
> FLUSH PRIVILEGES;
|
|
> EXIT;
|
|
```
|
|
|
|
```bash
|
|
mysqladmin -u photoprism -p version
|
|
apt install nginx -y
|
|
apt install php-fpm php-mysql -y
|
|
echo>/etc/nginx/sites-available/default
|
|
nano /etc/nginx/sites-available/default
|
|
```
|
|
|
|
```conf
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
index index.html index.htm index.php index.nginx-debian.html;
|
|
server_name _;
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
root /var/www/html;
|
|
}
|
|
location ~ \.php$ {
|
|
include snippets/fastcgi-php.conf;
|
|
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
|
|
root /usr/share/phpmyadmin;
|
|
}
|
|
}
|
|
```
|
|
|
|
```bash
|
|
nginx -t
|
|
systemctl restart nginx
|
|
nano /etc/php/8.1/fpm/conf.d/photoprism.ini
|
|
```
|
|
|
|
```conf
|
|
date.timezone = US/Arizona
|
|
display_errors = On
|
|
memory_limit = 256M
|
|
upload_max_filesize = 100M
|
|
post_max_size = 100M
|
|
```
|
|
|
|
```bash
|
|
service php8.1-fpm restart
|
|
echo "<?php phpinfo(); ?>" >> /var/www/html/info.php
|
|
code .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
apt install phpmyadmin -y
|
|
cp -r /usr/share/phpmyadmin/* /var/www/html/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wsl --export Ubuntu-PhotoPrism Ubuntu-PhotoPrism\ubuntu-PhotoPrism-Empty.tar
|
|
wsl --import Ubuntu-PhotoPrism .\Ubuntu-PhotoPrism Ubuntu-PhotoPrism\ubuntu-PhotoPrism-Empty.tar
|
|
|
|
|
|
|
|
```
|