2024-06-03
This commit is contained in:
88
_-Review/photo-prism.md
Normal file
88
_-Review/photo-prism.md
Normal file
@ -0,0 +1,88 @@
|
||||
---
|
||||
type: "note"
|
||||
---
|
||||
|
||||
# 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 .
|
||||
# http://localhost/info.php
|
||||
# https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-with-nginx-on-an-ubuntu-20-04-server
|
||||
# https://www.linuxbabe.com/ubuntu/install-phpmyadmin-nginx-lemp-ubuntu-20-04
|
||||
apt install phpmyadmin -y
|
||||
cp -r /usr/share/phpmyadmin/* /var/www/html/
|
||||
# https://docs.photoprism.app/developer-guide/setup/
|
||||
# bash <(curl -s https://setup.photoprism.app/ubuntu/install-docker.sh)
|
||||
# -
|
||||
# https://docs.photoprism.app/getting-started/faq/#how-can-i-install-photoprism-without-docker
|
||||
# git clone https://github.com/photoprism/photoprism.git
|
||||
# cd photoprism
|
||||
# make all install DESTDIR=/opt/photoprism
|
||||
wsl --export Ubuntu-PhotoPrism Ubuntu-PhotoPrism\ubuntu-PhotoPrism-Empty.tar
|
||||
wsl --import Ubuntu-PhotoPrism .\Ubuntu-PhotoPrism Ubuntu-PhotoPrism\ubuntu-PhotoPrism-Empty.tar
|
||||
# http://localhost/index.php?route=/server/databases
|
||||
```
|
Reference in New Issue
Block a user