User Tools

Site Tools


servers:bsd: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:bsd:nginx:friendica [2026/01/09 09:12] – [Worker] Sean Rhoneservers:bsd:nginx:friendica [2026/03/05 16:14] (current) Sean Rhone
Line 28: Line 28:
  
   * https://github.com/friendica/friendica/commits/develop/   * https://github.com/friendica/friendica/commits/develop/
 +  * https://github.com/friendica/friendica-addons/commits/develop/ ((Required for ''composer install'' even without any addons enabled))
  
   su -   su -
  
   git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica.git' '/usr/local/www/social' && chown -R 'www':'www' '/usr/local/www/social'   git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica.git' '/usr/local/www/social' && chown -R 'www':'www' '/usr/local/www/social'
- 
-===== Addons ===== 
- 
-  * https://github.com/friendica/friendica-addons/commits/develop/ 
-  * :!: Required for ''composer install'' even without any addons enabled 
  
   git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/usr/local/www/social/addon' && chown -R 'www':'www' '/usr/local/www/social/addon'   git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/usr/local/www/social/addon' && chown -R 'www':'www' '/usr/local/www/social/addon'
Line 46: Line 42:
   su -   su -
  
-  cd '/tmp' && su -m 'www' -c "cd '/tmp&& '/usr/local/bin/composer.phar' --working-dir='/usr/local/www/social' --no-cache install --no-dev"+  cd '/tmp' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/bin/composer.phar' --working-dir='/usr/local/www/social' --no-cache install --no-dev"
  
 ====== Database ====== ====== Database ======
Line 175: Line 171:
   * https://wiki.friendi.ca/docs/install#option_brun_the_automatic_install_script   * https://wiki.friendi.ca/docs/install#option_brun_the_automatic_install_script
  
-  * :!: 2025/10/30: This failed to find a file and didn't seem to work ((restoring a previous-install works fine bypassing this initial set-up))+  * :!: 2025/10/30: This failed to find a file and didn't seem to work ((:?: This might have been because of ''--dbhost'' being ''localhost'' before)) (([[#restore|restoring]] a previous-install works fine bypassing this initial set-up))
   * :!: Change ''--dbpass'', and ''--admin'' to email   * :!: Change ''--dbpass'', and ''--admin'' to email
   * :?: Might be able to use ''--file'' on manually-created [[#localconfigphp|local.config.php]] instead   * :?: Might be able to use ''--file'' on manually-created [[#localconfigphp|local.config.php]] instead
Line 203: Line 199:
  
 ===== Etc ===== ===== Etc =====
- 
-'/usr/bin/su' -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' 
  
   su -   su -
- 
-  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' worker" 
- 
-  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' dbstructure update --force" 
- 
-  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' dbstructure drop --execute" 
- 
-  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' postupdate" 
- 
-  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' cache clear" 
- 
-  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' clearavatarcache" 
  
   cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' config 'system' 'basepath' '/usr/local/www/social'"   cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' config 'system' 'basepath' '/usr/local/www/social'"
  
   cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' config 'config' 'info' 'https://wiki.realmofespionage.xyz/servers:bsd:nginx:friendica'"   cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' config 'config' 'info' 'https://wiki.realmofespionage.xyz/servers:bsd:nginx:friendica'"
- 
-  exit 
  
 ====== Settings ====== ====== Settings ======
Line 246: Line 226:
   su -   su -
  
-  su -m 'www' -c "ee '/usr/local/www/social/config/local.config.php'"+  su -m 'www' -c "ee '/usr/local/www/social/config/local.config.php'" && clear
  
 <code> <code>
Line 289: Line 269:
  
 '/usr/bin/su' -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' worker" > '/dev/null' '/usr/bin/su' -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' worker" > '/dev/null'
 +
 +cd '/tmp'
  
 # End</code> # End</code>
Line 317: Line 299:
 '/usr/bin/su' -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' postupdate" > '/dev/null' '/usr/bin/su' -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' postupdate" > '/dev/null'
  
 +cd '/tmp'
 '/bin/sync' '/bin/sync'
  
Line 322: Line 305:
  
   su 'root' -c ~/'.local/scripts/www/social/updater.sh'   su 'root' -c ~/'.local/scripts/www/social/updater.sh'
 +
 +===== Backup =====
 +
 +  mkdir -p ~/'backups' ~/'.local/scripts/www/social' && ee ~/'.local/scripts/www/social/backup.sh' && chmod +x ~/'.local/scripts/www/social/backup.sh'
 +
 +<code>
 +#!/bin/sh
 +
 +cd '/tmp'
 +
 +'/usr/bin/tar' -czf '/home/espionage724/backups/friendica-files-auto-'$(date +%Y-%m-%d)'.tar.gz' -C '/usr/local/www' 'social'
 +
 +'/usr/local/bin/mariadb-dump' --single-transaction --quick 'friendica' -r '/home/espionage724/backups/friendica-database-auto-'$(date +%Y-%m-%d)'.sql'
 +
 +'/bin/sync'
 +
 +# End</code>
 +
 +  su 'root' -c ~/'.local/scripts/www/social/backup.sh'
  
 ===== Maintenance ===== ===== Maintenance =====
Line 330: Line 332:
 #!/bin/sh #!/bin/sh
  
-su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/social' gc --aggressive --prune='all'" +cd '/tmp'
-su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/socialfsck --full --strict"+
  
-su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/social/addon' gc --aggressive --prune='all'" +'/usr/bin/su-m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/social' gc --aggressive --prune='all'" 
-su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/social/addon' fsck --full --strict"+'/usr/bin/su-m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/social' fsck --full --strict"
  
-su -m 'www' -c "'/usr/local/bin/php' '/usr/local/www/social/bin/console.phpcache clear+'/usr/bin/su-m 'www' -c "'/usr/local/bin/git-C '/usr/local/www/social/addon' gc --aggressive --prune='all'" 
-su -m 'www' -c "'/usr/local/bin/php' '/usr/local/www/social/bin/console.phpclearavatarcache"+'/usr/bin/su-m 'www' -c "'/usr/local/bin/git-C '/usr/local/www/social/addonfsck --full --strict"
  
-'/usr/local/bin/mariadb-check' -o -f -e --auto-repair 'friendica'+cd '/usr/local/www/social'
  
-# End</code>+'/usr/bin/su' -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' cache clear" '/dev/null' 
 +'/usr/bin/su' -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' clearavatarcache" > '/dev/null'
  
-  ~/'.local/scripts/www/social/maintenance.sh'+cd '/tmp' 
 + 
 +# End</code>
  
   su 'root' -c ~/'.local/scripts/www/social/maintenance.sh'   su 'root' -c ~/'.local/scripts/www/social/maintenance.sh'
Line 439: Line 443:
  
 0 4 * * * root '/home/espionage724/.local/scripts/www/social/updater.sh' 0 4 * * * root '/home/espionage724/.local/scripts/www/social/updater.sh'
 +
 +# End</code>
 +
 +===== Backup =====
 +
 +  * Monthly (5th) ''04:10:00 AM''
 +
 +  su -
 +
 +  ee '/etc/cron.d/social-backup'
 +
 +<code>
 +#
 +SHELL=/bin/sh
 +
 +10 4 5 * * root '/home/espionage724/.local/scripts/www/social/backup.sh'
 +
 +# End</code>
 +
 +===== Maintenance =====
 +
 +  * Monthly (5th) ''04:30:00 AM''
 +
 +  su -
 +
 +  ee '/etc/cron.d/social-maintenance'
 +
 +<code>
 +#
 +SHELL=/bin/sh
 +
 +30 4 5 * * root '/home/espionage724/.local/scripts/www/social/maintenance.sh'
  
 # End</code> # End</code>
Line 452: Line 488:
 ===== Database ===== ===== Database =====
  
-****+  su -
  
-  mariadb-dump -u root -p --single-transaction --quick 'friendica' -r '/home/espionage724/friendica-database-manual-'$(date +%Y-%m-%d)'.sql'+  mariadb-dump --single-transaction --quick 'friendica' -r '/home/espionage724/friendica-database-manual-'$(date +%Y-%m-%d)'.sql'
  
 ===== scp ===== ===== scp =====
Line 474: Line 510:
   su -   su -
  
-  rm -Rf '/usr/local/www/social'+  ls '/home/'$USER'/friendica-files-'*'.tar.gz' && rm -Rf '/usr/local/www/social'
  
-  tar -xzf '/home/espionage724/friendica-files-'*'.tar.gz' -C '/usr/local/www' 'social' && chown -R 'www':'www' '/usr/local/www/social' && sync+  tar -xzf '/home/'$USER'/friendica-files-'*'.tar.gz' -C '/usr/local/www' 'social' && chown -R 'www':'www' '/usr/local/www/social' && sync
  
 ===== Database ===== ===== Database =====
Line 492: Line 528:
   su -   su -
  
-  su -m 'www' -c "ee '/usr/local/www/social/config/local.config.php'"+  su -m 'www' -c "ee '/usr/local/www/social/config/local.config.php'" && clear
  
   'hostname' => '127.0.0.1',   'hostname' => '127.0.0.1',
Line 499: Line 535:
  
   'basepath' => '/usr/local/www/social',   'basepath' => '/usr/local/www/social',
 +
 +===== Etc =====
 +
 +  su -
 +
 +  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' worker"
 +
 +  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' dbstructure update --force"
 +
 +  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' dbstructure drop --execute"
 +
 +  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' postupdate"
 +
 +  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' cache clear"
 +
 +  cd '/usr/local/www/social' && su -m 'www' -c "'/usr/local/bin/php' -c '/usr/local/etc/php-fpm.d/social.conf' '/usr/local/www/social/bin/console.php' clearavatarcache"
 +
 +  exit
  
/usr/local/www/wiki/data/attic/servers/bsd/nginx/friendica.1767967977.txt.gz · Last modified: by Sean Rhone