User Tools

Site Tools


servers:linux:nginx:friendica

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:linux:nginx:friendica [2025/09/11 18:19] Sean Rhoneservers:linux:nginx:friendica [2025/10/17 01:56] (current) – [Etc] Sean Rhone
Line 4: Line 4:
   * [[information:realm_of_espionage|Realm of Espionage]]   * [[information:realm_of_espionage|Realm of Espionage]]
   * https://social.realmofespionage.xyz   * https://social.realmofespionage.xyz
 +
 +===== Resources =====
 +
 +  * https://wiki.friendi.ca/docs/bbcode
  
 ===== Prerequisites ===== ===== Prerequisites =====
Line 17: Line 21:
   * 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 ======
Line 28: Line 32:
  
   * 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'
Line 52: Line 56:
   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 ======
Line 195: Line 197:
  
   nano '/srv/www/social/config/local.config.php'   nano '/srv/www/social/config/local.config.php'
 +
 +  exit
  
 ====== Settings ====== ====== Settings ======
Line 234: Line 238:
 ==== 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
Line 245: Line 249:
  
 [Timer] [Timer]
-OnBootSec=12h +OnBootSec=10m 
-OnUnitActiveSec=12h+OnUnitActiveSec=10m
  
 [Install] [Install]
Line 373: Line 377:
 === 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
Line 403: Line 407:
 Type=oneshot Type=oneshot
  
 +ExecStart='/usr/bin/git' -C '/srv/www/social' reset --hard
 ExecStart='/usr/bin/git' -C '/srv/www/social' gc --aggressive --prune='all' ExecStart='/usr/bin/git' -C '/srv/www/social' gc --aggressive --prune='all'
 ExecStart='/usr/bin/git' -C '/srv/www/social' fsck --full --strict ExecStart='/usr/bin/git' -C '/srv/www/social' fsck --full --strict
  
 +ExecStart='/usr/bin/git' -C '/srv/www/social/addon' reset --hard
 ExecStart='/usr/bin/git' -C '/srv/www/social/addon' gc --aggressive --prune='all' ExecStart='/usr/bin/git' -C '/srv/www/social/addon' gc --aggressive --prune='all'
 ExecStart='/usr/bin/git' -C '/srv/www/social/addon' fsck --full --strict ExecStart='/usr/bin/git' -C '/srv/www/social/addon' fsck --full --strict
Line 462: Line 468:
   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 =====
Line 481: Line 487:
  
   sudo tar -xzf ~/'friendica-files-'*'.tar.gz' -C '/srv/www' 'social' && sudo chown -R 'wwwrun':'www' '/srv/www/social' && sudo chmod -R '0755' '/srv/www/social'   sudo tar -xzf ~/'friendica-files-'*'.tar.gz' -C '/srv/www' 'social' && sudo chown -R 'wwwrun':'www' '/srv/www/social' && sudo chmod -R '0755' '/srv/www/social'
 +
 +===== 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'
 +
 +  rm -Rf '/srv/www/social/.git'
 +
 +  git -C '/srv/www/social' init --initial-branch='develop'
 +
 +  git -C '/srv/www/social' add '.'
 +
 +  git -C '/srv/www/social' config 'user.email' 'espionage724@x'
 +
 +  git -C '/srv/www/social' commit --message='x'
 +
 +  git -C '/srv/www/social' remote add 'origin' 'https://github.com/friendica/friendica.git'
 +
 +  git -C '/srv/www/social' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase
 +
 +  git -C '/srv/www/social' reset --hard 'origin/develop'
 +
 +  git -C '/srv/www/social' gc --aggressive --prune='all'
 +
 +  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
 +
 +===== 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 =====
Line 490: Line 561:
   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 =====
Line 502: Line 573:
 **** ****
  
-  rm -fv ~/'friendica-files-'*'.tar.gz' ~/'friendica-database-'*'.sql'+  rm -fv ~/'friendica-files-'*'.tar.gz' ~/'friendica'*'.sql'
  
/srv/www/wiki/data/attic/servers/linux/nginx/friendica.1757629145.txt.gz · Last modified: by Sean Rhone