Both sides previous revisionPrevious revisionNext revision | Previous revision |
servers:linux:nginx:friendica [2025/09/18 04:04] – Sean Rhone | servers:linux:nginx:friendica [2025/10/17 01:56] (current) – [Etc] Sean Rhone |
---|
* https://wiki.friendi.ca/docs/install#requirements | * https://wiki.friendi.ca/docs/install#requirements |
| |
sudo zypper install php-composer2 php8-curl php-gd php8-gmp php8-pdo php8-mbstring php8-intl php8-mysql php8-zip php8-openssl php8-posix | sudo zypper install php-composer2 php8-curl php-gd php8-gmp php8-pdo php8-mbstring php8-intl php8-mysql php8-zip php8-openssl php8-fileinfo php8-posix |
| |
====== Download Source ====== | ====== Download Source ====== |
| |
* https://github.com/friendica/friendica-addons/commits/develop/ | * https://github.com/friendica/friendica-addons/commits/develop/ |
* Required for ''composer install'' even without addons actively used | * :!: Required for ''composer install'' even without any addons enabled |
| |
sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/srv/www/social/addon' && sudo chown -R 'wwwrun':'www' '/srv/www/social/addon' && sudo chmod -R '0755' '/srv/www/social/addon' | sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/srv/www/social/addon' && sudo chown -R 'wwwrun':'www' '/srv/www/social/addon' && sudo chmod -R '0755' '/srv/www/social/addon' |
GRANT ALL PRIVILEGES ON friendica.* to 'friendica'@'localhost'; | GRANT ALL PRIVILEGES ON friendica.* to 'friendica'@'localhost'; |
| |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES;EXIT; |
| |
EXIT | |
| |
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== |
| |
nano '/srv/www/social/config/local.config.php' | nano '/srv/www/social/config/local.config.php' |
| |
| exit |
| |
====== Settings ====== | ====== Settings ====== |
==== Timer ==== | ==== Timer ==== |
| |
* Every 12 hours | * Every 10 minutes (([[https://wiki.friendi.ca/docs/install#required_background_tasks|info]])) |
| |
sudo -e '/etc/systemd/system/social-d.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'social-d.timer' --now && sudo systemctl start 'social-d' && sudo systemctl status 'social-d' -l | sudo -e '/etc/systemd/system/social-d.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'social-d.timer' --now && sudo systemctl start 'social-d' && sudo systemctl status 'social-d' -l |
| |
[Timer] | [Timer] |
OnBootSec=12h | OnBootSec=10m |
OnUnitActiveSec=12h | OnUnitActiveSec=10m |
| |
[Install] | [Install] |
=== Timer === | === Timer === |
| |
* ''01'' day of every month at ''01:10:00'' | * ''01'' day of every month at ''04:10:00'' |
| |
sudo -e '/etc/systemd/system/social-db.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'social-db.timer' --now && sudo systemctl start 'social-db' && sudo systemctl status 'social-db' -l | sudo -e '/etc/systemd/system/social-db.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'social-db.timer' --now && sudo systemctl start 'social-db' && sudo systemctl status 'social-db' -l |
scp ~/'Downloads/friendica-files-'*'.tar.gz' espionage724@192.168.1.152:~ | scp ~/'Downloads/friendica-files-'*'.tar.gz' espionage724@192.168.1.152:~ |
| |
scp ~/'Downloads/friendica-database-'*'.sql' espionage724@192.168.1.152:~ | scp ~/'Downloads/friendica'*'.sql' espionage724@192.168.1.152:~ |
| |
===== Stop nginx ===== | ===== Stop nginx ===== |
| |
===== Git Fix ===== | ===== Git Fix ===== |
| |
| * :!: Set email for ''user.email'' |
| * :!: Requires [[#etc|Etc]] commands afterwards ((https://social.realmofespionage.xyz doesn't redirect to single-profile URL and shows an error)) |
| |
sudo su 'wwwrun' -s '/bin/bash' | sudo su 'wwwrun' -s '/bin/bash' |
| |
cd '/srv/www/social' | rm -Rf '/srv/www/social/.git' |
| |
rm -Rf '.git' | git -C '/srv/www/social' init --initial-branch='develop' |
| |
git init -b 'develop' | git -C '/srv/www/social' add '.' |
| |
git add '.' | git -C '/srv/www/social' config 'user.email' 'espionage724@x' |
| |
git commit -m 'x' | git -C '/srv/www/social' commit --message='x' |
| |
cd '/srv/www/social/addon' | git -C '/srv/www/social' remote add 'origin' 'https://github.com/friendica/friendica.git' |
| |
rm -Rf '.git' | git -C '/srv/www/social' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase |
| |
git init -b 'develop' | git -C '/srv/www/social' reset --hard 'origin/develop' |
| |
git add '.' | git -C '/srv/www/social' gc --aggressive --prune='all' |
| |
git commit -m 'x' | git -C '/srv/www/social' fsck --full --strict |
| |
| ==== Addons ==== |
| |
| * :!: Set email for ''user.email'' |
| |
| rm -Rf '/srv/www/social/addon/.git' |
| |
| git -C '/srv/www/social/addon' init --initial-branch='develop' |
| |
| git -C '/srv/www/social/addon' add '.' |
| |
| git -C '/srv/www/social/addon' config 'user.email' 'espionage724@x' |
| |
| git -C '/srv/www/social/addon' commit --message='x' |
| |
| git -C '/srv/www/social/addon' remote add 'origin' 'https://github.com/friendica/friendica-addons.git' |
| |
| git -C '/srv/www/social/addon' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase |
| |
| git -C '/srv/www/social/addon' reset --hard 'origin/develop' |
| |
| git -C '/srv/www/social/addon' gc --aggressive --prune='all' |
| |
| git -C '/srv/www/social/addon' fsck --full --strict |
| |
exit | exit |
| |
| ===== Database Connection ===== |
| |
| sudo -e '/srv/www/social/config/local.config.php' && sudo chown -v 'wwwrun':'www' '/srv/www/social/config/local.config.php' |
| |
| <code> |
| 'database' => [ |
| 'hostname' => 'localhost',</code> |
| |
| <code> |
| 'system' => [ |
| 'basepath' => '/srv/www/social',</code> |
| |
===== Restore Database ===== | ===== Restore Database ===== |
sudo mariadb --execute='CREATE DATABASE friendica;' | sudo mariadb --execute='CREATE DATABASE friendica;' |
| |
sudo mariadb 'friendica' < ~/'friendica-database-'*'.sql' | sudo mariadb 'friendica' < ~/'friendica'*'.sql' |
| |
===== Start nginx ===== | ===== Start nginx ===== |
**** | **** |
| |
rm -fv ~/'friendica-files-'*'.tar.gz' ~/'friendica-database-'*'.sql' | rm -fv ~/'friendica-files-'*'.tar.gz' ~/'friendica'*'.sql' |
| |