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/18 04:04] Sean Rhoneservers:linux:nginx:friendica [2025/10/17 01:56] (current) – [Etc] Sean Rhone
Line 21: 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 32: 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 56: 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 199: Line 197:
  
   nano '/srv/www/social/config/local.config.php'   nano '/srv/www/social/config/local.config.php'
 +
 +  exit
  
 ====== Settings ====== ====== Settings ======
Line 238: 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 249: Line 249:
  
 [Timer] [Timer]
-OnBootSec=12h +OnBootSec=10m 
-OnUnitActiveSec=12h+OnUnitActiveSec=10m
  
 [Install] [Install]
Line 377: 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 468: 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 489: Line 489:
  
 ===== 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 -'/srv/www/social' init --initial-branch='develop'
  
-  git init -'develop'+  git -'/srv/www/social' add '.'
  
-  git add '.'+  git -C '/srv/www/social' config 'user.email' 'espionage724@x'
  
-  git commit -'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 -'/srv/www/socialpull --depth '1' --recurse-submodules 'origin' 'develop' --rebase
  
-  git init -'develop'+  git -'/srv/www/social' reset --hard 'origin/develop'
  
-  git add '.'+  git -C '/srv/www/social' gc --aggressive --prune='all'
  
-  git commit -'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 =====
Line 522: 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 534: 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.1758182696.txt.gz · Last modified: by Sean Rhone