servers:linux:nginx:piwigo
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
servers:linux:nginx:piwigo [2024/08/13 22:17] – created Sean Rhone | servers:linux:nginx:piwigo [2025/08/27 20:15] (current) – Sean Rhone | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Piwigo ((https:// | * Piwigo ((https:// | ||
* Bootstrap Darkroom Theme ((https:// | * Bootstrap Darkroom Theme ((https:// | ||
- | * '' | ||
* [[Information: | * [[Information: | ||
* https:// | * https:// | ||
+ | |||
+ | ===== TODOs ===== | ||
+ | |||
+ | * Show title on pictures (long titles get cut-off in navbar) | ||
+ | * AI ([[https:// | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | * [[distros:fedora_server|Fedora | + | * [[linux:distros:server: |
- | * [[servers:mariadb|MariaDB]] | + | * [[servers:linux: |
- | * [[servers: | + | * [[servers;linux;nginx;lets_encrypt|Certbot (Let's Encrypt)]] |
- | * [[servers:nginx:lets_encrypt|Let' | + | * [[servers: |
====== Dependencies ====== | ====== Dependencies ====== | ||
Line 19: | Line 23: | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
+ | |||
+ | sudo zypper install php8-gd php8-exif php8-mbstring php8-mysql php8-opcache | ||
+ | |||
+ | ===== Old TODO ===== | ||
sudo dnf install php-mysqlnd php-imagick php-gd perl-Image-ExifTool mediainfo ffmpeg-free libvorbis poppler-utils | sudo dnf install php-mysqlnd php-imagick php-gd perl-Image-ExifTool mediainfo ffmpeg-free libvorbis poppler-utils | ||
+ | |||
+ | sudo zypper install php8-bz2 php8-intl php8-sodium php8-zlib | ||
====== Download Source ====== | ====== Download Source ====== | ||
Line 26: | Line 36: | ||
* Also includes the [[https:// | * Also includes the [[https:// | ||
- | sudo git clone --branch ' | + | sudo git clone --branch ' |
====== Database ====== | ====== Database ====== | ||
Line 34: | Line 44: | ||
CREATE DATABASE piwigo; | CREATE DATABASE piwigo; | ||
- | GRANT ALL PRIVILEGES ON piwigo.* to ' | + | |
+ | |||
+ | | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
Line 44: | Line 56: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | sudo -e '/ | + | sudo -e '/etc/php8/fpm/ |
< | < | ||
Line 78: | Line 90: | ||
===== FastCGI ===== | ===== FastCGI ===== | ||
+ | |||
+ | * '' | ||
sudo -e '/ | sudo -e '/ | ||
< | < | ||
- | # PHP-FPM | ||
location ~ \.(php|phar)(/ | location ~ \.(php|phar)(/ | ||
fastcgi_split_path_info ^(.+\.(?: | fastcgi_split_path_info ^(.+\.(?: | ||
Line 91: | Line 104: | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_pass unix:/ | fastcgi_pass unix:/ | ||
- | }</ | + | } |
+ | |||
+ | # End</ | ||
===== Server Block ===== | ===== Server Block ===== | ||
Line 331: | Line 346: | ||
WantedBy=timers.target</ | WantedBy=timers.target</ | ||
- | ====== | + | ====== |
- | * Create backup archive on server and transfer to client computer | + | ===== Client ===== |
- | ===== Server ===== | + | ==== Uncompress Database |
- | ==== Stop Services ==== | + | * This is only needed if restoring an **automated** database backup ((manual doesn' |
- | **** | + | gunzip ~/' |
- | sudo systemctl stop nginx php-fpm | + | ====== Files ====== |
- | ==== Backup | + | ===== Backup |
**** | **** | ||
- | | + | sudo tar -czf ~/' |
- | ==== Backup Database | + | ===== scp ===== |
- | **** | + | ==== To Client Backup ==== |
- | | + | |
+ | * Run on server | ||
- | ==== Start Services ==== | + | scp espionage724@192.168.1.152: |
- | **** | + | ==== To Server Restore ==== |
- | | + | |
+ | * Run on client | ||
- | ===== Client ===== | + | scp ~/' |
- | ==== Transfer Files To Client | + | ===== Restore ===== |
**** | **** | ||
- | | + | |
- | ====== Restore ====== | + | ===== Clean-up ===== |
- | + | ||
- | ===== Client ===== | + | |
- | + | ||
- | ==== Uncompress Database ==== | + | |
- | + | ||
- | * This is only needed if restoring an **automated** database backup ((manual doesn' | + | |
- | + | ||
- | gunzip ~/' | + | |
- | + | ||
- | ==== Transfer Files To Server | + | |
**** | **** | ||
- | | + | |
- | ==== Remove Files ==== | + | ====== Database ====== |
- | **** | + | ===== Backup |
- | + | ||
- | rm -f ~/' | + | |
- | + | ||
- | ===== Server | + | |
- | + | ||
- | ==== Stop Services | + | |
**** | **** | ||
- | sudo systemctl stop nginx php-fpm | + | sudo mariadb-dump --single-transaction --quick ' |
- | ==== Remove Previous Folder | + | ===== scp ===== |
- | **** | + | ==== To Client Backup ==== |
- | | + | |
+ | * Run on server | ||
- | ==== Restore Piwigo Folder ==== | + | scp espionage724@192.168.1.152: |
- | **** | + | ==== To Server Restore ==== |
- | | + | * Client |
+ | * Run on client | ||
- | ==== Drop Previous Database ==== | + | scp ~/' |
- | sudo mariadb | + | ===== Restore ===== |
- | | + | |
- | | + | |
- | EXIT | + | ==== Permissions |
- | + | ||
- | ==== Re-create Databases | + | |
sudo mariadb | sudo mariadb | ||
- | CREATE | + | CREATE |
- | + | ||
- | EXIT | + | |
- | + | ||
- | ==== Restore Database ==== | + | |
- | + | ||
- | **** | + | |
- | + | ||
- | sudo mariadb | + | |
- | + | ||
- | ==== Reapply Permissions ==== | + | |
- | + | ||
- | sudo mariadb | + | |
- | GRANT ALL PRIVILEGES ON piwigo.* to ' | + | GRANT ALL PRIVILEGES ON piwigo.* to ' |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
Line 445: | Line 434: | ||
EXIT | EXIT | ||
- | ==== Start Services | + | ===== Clean-up ===== |
**** | **** | ||
- | | + | rm -fv ~/' |
- | + | ||
- | ==== Remove Backups ==== | + | |
- | + | ||
- | * Verify that Piwigo works before running | + | |
- | + | ||
- | | + | |
/usr/local/www/wiki/data/attic/servers/linux/nginx/piwigo.1723601865.txt.gz · Last modified: (external edit)