servers:linux:nginx:piwigo
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
servers:linux:nginx:piwigo [2025/07/16 12:43] – openSUSE TW WIP Sean Rhone | servers:linux:nginx:piwigo [2025/08/27 20:15] (current) – Sean Rhone | ||
---|---|---|---|
Line 5: | Line 5: | ||
* [[Information: | * [[Information: | ||
* https:// | * https:// | ||
+ | |||
+ | ===== TODOs ===== | ||
+ | |||
+ | * Show title on pictures (long titles get cut-off in navbar) | ||
+ | * AI ([[https:// | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
* [[linux: | * [[linux: | ||
- | * [[servers: | ||
* [[servers: | * [[servers: | ||
* [[servers; | * [[servers; | ||
+ | * [[servers: | ||
====== Dependencies ====== | ====== Dependencies ====== | ||
Line 39: | Line 44: | ||
CREATE DATABASE piwigo; | CREATE DATABASE piwigo; | ||
- | GRANT ALL PRIVILEGES ON piwigo.* to ' | + | |
+ | |||
+ | | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
Line 49: | Line 56: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | sudo -e '/ | + | sudo -e '/etc/php8/fpm/ |
< | < | ||
Line 83: | 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 96: | 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 336: | 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 |
- | | + | GRANT ALL PRIVILEGES ON piwigo.* to ' |
- | + | ||
- | ==== Restore Database ==== | + | |
- | + | ||
- | **** | + | |
- | + | ||
- | sudo mariadb ' | + | |
- | + | ||
- | ==== Reapply Permissions ==== | + | |
- | + | ||
- | sudo mariadb | + | |
- | + | ||
- | | + | |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
Line 450: | 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.1752684188.txt.gz · Last modified: by Sean Rhone