servers:nginx:joomla
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
servers:nginx:joomla [2019/06/28 21:43] – [Copyright] Sean Rhone | servers:nginx:joomla [2021/09/30 22:37] – [Download Source] Sean Rhone | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | * [[distros:fedora_server|Fedora Server]] | + | * [[distros:opensuse_tumbleweed_server|openSUSE Tumbleweed]] |
- | * [[servers: | + | * [[servers: |
- | * [[servers: | + | * [[servers: |
- | * [[servers: | + | * [[servers: |
===== Notes ===== | ===== Notes ===== | ||
Line 26: | Line 26: | ||
**** | **** | ||
- | sudo git clone --branch 'staging' --depth ' | + | sudo git clone --branch '3.10-dev' --depth ' |
- | + | ||
- | ===== SELinux ===== | + | |
- | + | ||
- | sudo semanage fcontext --deleteall "/ | + | |
- | + | ||
- | sudo semanage fcontext --add --type ' | + | |
- | + | ||
- | sudo restorecon -R -v '/var/ | + | |
====== Database ====== | ====== Database ====== | ||
- | mysql --user=' | + | |
CREATE DATABASE joomla; | CREATE DATABASE joomla; | ||
Line 45: | Line 37: | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
+ | |||
+ | EXIT | ||
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== | ||
Line 50: | Line 44: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | sudo -e '/ | + | sudo -e '/etc/php7/fpm/ |
< | < | ||
[main] | [main] | ||
- | user = nginx | + | user = wwwrun |
- | group = nginx | + | group = www |
- | listen = / | + | listen = 127.0.0.1:9003 |
- | listen.owner = nginx | + | listen.owner = wwwrun |
- | listen.group = nginx | + | listen.group = www |
listen.allowed_clients = 127.0.0.1 | listen.allowed_clients = 127.0.0.1 | ||
- | pm = dynamic | + | pm = ondemand |
- | pm.max_children = 8 | + | pm.max_children = 4 |
- | pm.start_servers | + | pm.process_idle_timeout |
- | pm.min_spare_servers = 2 | + | |
- | pm.max_spare_servers = 4 | + | |
php_value[date.timezone] = " | php_value[date.timezone] = " | ||
Line 75: | Line 67: | ||
php_value[post_max_size] = " | php_value[post_max_size] = " | ||
php_value[upload_max_filesize] = " | php_value[upload_max_filesize] = " | ||
- | php_value[max_file_uploads] = " | + | php_value[max_file_uploads] = " |
- | + | ||
- | php_value[session.save_handler] = files | + | |
- | php_value[session.save_path] = / | + | |
- | php_value[soap.wsdl_cache_dir] = / | + | |
- | php_value[opcache.file_cache] = / | + | |
===== FastCGI ===== | ===== FastCGI ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 96: | Line 83: | ||
fastcgi_param SCRIPT_FILENAME | fastcgi_param SCRIPT_FILENAME | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | fastcgi_param PATH_INFO $fastcgi_path_info; | ||
- | fastcgi_pass | + | fastcgi_pass |
}</ | }</ | ||
===== Server Block ===== | ===== Server Block ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 107: | Line 94: | ||
listen ' | listen ' | ||
server_name ' | server_name ' | ||
- | root '/var/ | + | root '/srv/ |
index ' | index ' | ||
- | include '/ | + | include 'snippets.d/ |
- | include '/ | + | include 'snippets.d/ |
client_max_body_size ' | client_max_body_size ' | ||
Line 227: | Line 214: | ||
**** | **** | ||
- | | + | |
=== Text === | === Text === | ||
Line 234: | Line 221: | ||
* Remove '' | * Remove '' | ||
- | sudo -H -u ' | + | sudo -e 'srv/www/ |
< | < | ||
Line 248: | Line 235: | ||
* Requires [[servers: | * Requires [[servers: | ||
- | sudo -H -u 'nginx' | + | sudo -e '/ |
html, | html, | ||
Line 309: | Line 296: | ||
< | < | ||
[Service] | [Service] | ||
- | User=nginx | + | User=wwwrun |
- | Group=nginx | + | Group=www |
Type=oneshot | Type=oneshot | ||
- | ExecStart='/ | + | ExecStart='/ |
ExecStartPost='/ | ExecStartPost='/ | ||
Line 342: | Line 329: | ||
< | < | ||
[Service] | [Service] | ||
- | User=nginx | + | User=wwwrun |
- | Group=nginx | + | Group=www |
Type=oneshot | Type=oneshot | ||
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStart='/ | + | ExecStart='/ |
ExecStartPost='/ | ExecStartPost='/ | ||
Line 379: | Line 366: | ||
[Service] | [Service] | ||
Type=oneshot | Type=oneshot | ||
- | WorkingDirectory=/ | + | WorkingDirectory=/ |
ExecStart='/ | ExecStart='/ | ||
ExecStartPost='/ | ExecStartPost='/ | ||
Line 404: | Line 391: | ||
=== Database Auth === | === Database Auth === | ||
- | sudo -u ' | + | sudo mkdir -p '/var/lib/mysql/auth' |
< | < | ||
Line 413: | Line 400: | ||
=== Service === | === Service === | ||
- | | + | mkdir -p ~/' |
- | + | ||
- | | + | |
< | < | ||
Line 460: | Line 445: | ||
**** | **** | ||
- | cd '/var/www' && sudo tar -cvzf ~/' | + | cd '/srv/www' && sudo tar -cvzf ~/' |
==== Backup Database ==== | ==== Backup Database ==== | ||
Line 466: | Line 451: | ||
**** | **** | ||
- | sudo -u ' | + | sudo mysqldump --defaults-extra-file='/ |
==== Start Services ==== | ==== Start Services ==== | ||
Line 480: | Line 465: | ||
**** | **** | ||
- | scp espionage724@192.168.1.153: | + | scp espionage724@192.168.1.152: |
====== Restore ====== | ====== Restore ====== | ||
Line 496: | Line 481: | ||
**** | **** | ||
- | scp ~/' | + | scp ~/' |
==== Remove Files ==== | ==== Remove Files ==== | ||
Line 516: | Line 501: | ||
**** | **** | ||
- | cd '/var/www' && sudo tar -xvzf ~/' | + | cd '/srv/www' && sudo tar -xvzf ~/' |
- | + | ||
- | ==== SELinux ==== | + | |
- | + | ||
- | sudo semanage fcontext --deleteall "/ | + | |
- | + | ||
- | sudo semanage fcontext --add --type ' | + | |
- | + | ||
- | sudo restorecon -R -v '/ | + | |
==== Drop Previous Database ==== | ==== Drop Previous Database ==== | ||
- | mysql --user=' | + | |
DROP DATABASE joomla; | DROP DATABASE joomla; | ||
FLUSH TABLES; | FLUSH TABLES; | ||
+ | |||
+ | EXIT | ||
==== Re-create Databases ==== | ==== Re-create Databases ==== | ||
- | mysql --user=' | + | |
CREATE DATABASE joomla; | CREATE DATABASE joomla; | ||
+ | |||
+ | EXIT | ||
==== Restore Database ==== | ==== Restore Database ==== | ||
Line 544: | Line 525: | ||
**** | **** | ||
- | mysql --user=' | + | |
==== Reapply Permissions ==== | ==== Reapply Permissions ==== | ||
- | mysql --user=' | + | |
GRANT ALL PRIVILEGES ON joomla.* to ' | GRANT ALL PRIVILEGES ON joomla.* to ' | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
+ | |||
+ | EXIT | ||
==== Start Services ==== | ==== Start Services ==== | ||
Line 565: | Line 548: | ||
rm ~/' | rm ~/' | ||
+ |
/var/www/wiki/data/pages/servers/nginx/joomla.txt · Last modified: 2024/02/01 08:15 by Sean Rhone