Both sides previous revisionPrevious revisionNext revision | Previous revision |
servers:linux:nginx:joomla [2024/10/21 22:15] – Sean Rhone | servers:linux:nginx:joomla [2024/10/26 05:42] (current) – [Files] Sean Rhone |
---|
| |
* Joomla ((https://www.joomla.org)) | * Joomla ((https://www.joomla.org)) |
* :!: 5.3-dev ((https://github.com/joomla/joomla-cms/tree/5.3-dev)) | * :!: [[https://github.com/joomla/joomla-cms/tree/5.3-dev|5.3-dev]] branch ((Joomla version relies mainly on [[#purity_iii_template|Purity III/T3 support]]; 5.* works, 6+ unknown)) |
* [[Information:Realm of Espionage]] | * [[Information:Realm of Espionage]] |
* https://realmofespionage.xyz | * https://realmofespionage.xyz |
===== Prerequisites ===== | ===== Prerequisites ===== |
| |
* [[distros:fedora_server|Fedora Server]] | * [[linux:distros:server:fedora_server|Fedora Server]] |
* [[servers:mariadb|MariaDB]] | * [[servers:linux:mariadb|MariaDB]] |
* [[servers:nginx_php_php-fpm|nginx + PHP + PHP-FPM]] | * [[servers:linux:nginx_php_php-fpm|nginx + PHP + PHP-FPM]] |
* [[servers:nginx:lets_encrypt|Let's Encrypt]] | * [[servers:linux:nginx:lets_encrypt|Let's Encrypt]] |
| |
===== Notes ===== | |
| |
* Purity III ThemeMagic is not available with Joomla 4.x ([[https://www.joomlart.com/forums/d/46542-theme-magic-option-is-not-visible/2|source]]) | |
| |
====== Dependencies ====== | ====== Dependencies ====== |
* https://manual.joomla.org/docs/next/get-started/technical-requirements/ | * https://manual.joomla.org/docs/next/get-started/technical-requirements/ |
* https://docs.joomla.org/J5.x:Optional_Technical_Requirements | * https://docs.joomla.org/J5.x:Optional_Technical_Requirements |
* ''php8-ldap'' isn't required but ''composer install'' complains about it unless you ignore platform dependencies | |
| |
sudo dnf install composer nodejs php-ldap php-mysqlnd php-mbstring php-gd php-sodium | sudo dnf install composer nodejs php-ldap php-mysqlnd php-mbstring php-gd php-sodium |
====== Download Source ====== | ====== Download Source ====== |
| |
**** | * https://github.com/joomla/joomla-cms/branches |
| * ''5.3-dev'' ((Joomla version relies mainly on [[#purity_iii_template|Purity III/T3 support]]; 5.* works, 6+ unknown)) |
| |
sudo git clone --branch '5.3-dev' --depth '1' --recurse-submodules 'https://github.com/joomla/joomla-cms.git' '/var/www/main' && sudo semanage fcontext --add --type 'httpd_sys_rw_content_t' '/var/www/main(/.*)?' && sudo restorecon -F -I -R '/var/www/main' && sudo chown -R 'nginx':'nginx' '/var/www/main' && sync | sudo git clone --branch '5.3-dev' --depth '1' --recurse-submodules 'https://github.com/joomla/joomla-cms.git' '/var/www/main' && sudo semanage fcontext --add --type 'httpd_sys_rw_content_t' '/var/www/main(/.*)?' && sudo restorecon -F -I -R '/var/www/main' && sudo chown -R 'nginx':'nginx' '/var/www/main' && sync |
| |
* https://realmofespionage.xyz | * https://realmofespionage.xyz |
* :!: If Joomla gives a 500 error, it's likely the ''sessions'' folder not having the right permissions, see [[servers:nginx_php_php-fpm#permissions]] | * :!: If Joomla gives a 500 error, it's likely the ''sessions'' folder not having the right permissions, see [[servers:linux:nginx_php_php-fpm#permissions|nginx - Permissions]] |
| |
====== Settings ====== | ====== Settings ====== |
| |
* [[https://www.joomlart.com/member/downloads/joomlart/free-templates/purity-iii|Downloads]] | * [[https://www.joomlart.com/member/downloads/joomlart/free-templates/purity-iii|Downloads]] |
* Download **Purity III Template** and **T3 System Plugin** (:!: not 20 MB+ quickstarts; not ''Purity III for Joomla 5'') | * Download **Purity III Template** and **T3 System Plugin** (:!: not 20 MB+ quickstarts; **not** ''Purity III for Joomla 5'') |
| |
==== System Dashboard ==== | ==== System Dashboard ==== |
==== Home ==== | ==== Home ==== |
| |
* The line-breaks are intentional and are there to make how it displays look nicer | * Toggle Editor for raw-HTML paste |
* Add links to ''my'' and ''RoE | Wiki'' | |
| |
<code> | <code> |
| <p><br>Welcome! Realm of Espionage is <a href="https://wiki.realmofespionage.xyz/user:espionage724" target="_blank" rel="noopener">my</a> creative space online, and the umbrella name I provide my services under. RoE is entirely self-hosted, in-house, with free and open-source software, and fully-documented in my unique notes style on <a href="https://wiki.realmofespionage.xyz/" target="_blank" rel="noopener">RoE | Wiki</a>, my encyclopedia of technical notes and no-nonsense automation.</p> |
| <p> </p> |
| <p>This domain serves as a landing page and provides links to the services I offer, some of my online profiles, and projects showcase. To view them, use the navigation bar (desktop) or the ≡ hamburger icon (mobile) at the top of the screen.</p> |
| <!-- End --></code> |
| |
| === Temp === |
| |
Welcome! Realm of Espionage is my creative space online, and the umbrella name I provide my services under. RoE is entirely self-hosted, in-house, with free and open-source software, and fully-documented in my unique notes style on RoE | Wiki, my encyclopedia of technical notes and no-nonsense automation. | **** |
| |
| <code> |
| <p> </p> |
This domain serves as a landing page and provides links to the services I offer, some of my online profiles, and projects showcase. To view them, use the navigation bar (desktop) or the ≡ hamburger icon (mobile) at the top of the screen. | <p>(website is under construction and there aren't any links in the nav bar yet; my <a href="https://wiki.realmofespionage.xyz/">wiki</a> is far-more interesting! <a href="https://wiki.realmofespionage.xyz/user:espionage724">webmaster info</a>, <a href="https://wiki.realmofespionage.xyz/servers:linux:nginx:joomla" target="_blank" rel="noopener">dev notes</a>)</p> |
| <!-- End --></code> |
</code> | |
| |
===== Offline Message ===== | ===== Offline Message ===== |
==== Service ==== | ==== Service ==== |
| |
* 2023/09/12: TODO: SELinux prevents various actions with ''npm''; is it even needed? | * 2023/09/12: TODO: SELinux prevents various actions with ''npm''; is it needed? |
| * ''5.3-dev'' branch |
| |
sudo -e '/etc/systemd/system/main-up.service' | sudo -e '/etc/systemd/system/main-up.service' |
=== Service === | === Service === |
| |
* The extra ''ExecStart'' is an additional backup location that expects [[servers:vsftpd|vsftpd]] | * The extra ''ExecStart'' is an additional backup location that expects [[servers:linux:vsftpd#fstab1|vsftpd - fstab]] |
| |
mkdir -p ~/'backups' && sudo -e '/etc/systemd/system/main-fb.service' && sudo sed -i 's/CHANGEME/'$USER'/g' '/etc/systemd/system/main-fb.service' | mkdir -p ~/'backups' && sudo -e '/etc/systemd/system/main-fb.service' && sudo sed -i 's/CHANGEME/'$USER'/g' '/etc/systemd/system/main-fb.service' |
==== Backup Database ==== | ==== Backup Database ==== |
| |
**** | * TODO: Looks redundant to use the ''auth'' file //and// ''sudo'' |
| |
sudo mariadb-dump --defaults-extra-file='/var/lib/mysql/auth/joomla' --single-transaction 'joomla_db' -r ~/'joomla-database-manual-'$(date +%Y-%m-%d)'.sql' && sync | sudo mariadb-dump --defaults-extra-file='/var/lib/mysql/auth/joomla' --single-transaction 'joomla_db' -r ~/'joomla-database-manual-'$(date +%Y-%m-%d)'.sql' && sync |
cd '/var/www' && sudo tar -xvzf ~/'joomla-files-'*'.tar.gz' 'main' && sudo semanage fcontext --add --type 'httpd_sys_rw_content_t' '/var/www/main(/.*)?' && sudo restorecon -F -I -R '/var/www/main' && sudo chown -R 'nginx':'nginx' '/var/www/main' && cd ~ && sync | cd '/var/www' && sudo tar -xvzf ~/'joomla-files-'*'.tar.gz' 'main' && sudo semanage fcontext --add --type 'httpd_sys_rw_content_t' '/var/www/main(/.*)?' && sudo restorecon -F -I -R '/var/www/main' && sudo chown -R 'nginx':'nginx' '/var/www/main' && cd ~ && sync |
| |
==== Drop Previous Database ==== | ==== Database ==== |
| |
sudo mariadb | * ''x'' is path to a ''joomla_db'' ''.sql'' database dump |
| |
DROP DATABASE joomla_db; | mariadb --user='root' --password --execute='DROP DATABASE joomla_db' |
| |
FLUSH TABLES; | mariadb --user='root' --password --execute='CREATE DATABASE joomla_db' |
| |
EXIT | |
| |
==== Re-create Databases ==== | |
| |
sudo mariadb | |
| |
CREATE DATABASE joomla_db; | |
| |
EXIT | |
| |
==== Restore Database ==== | |
| |
**** | |
| |
sudo mariadb 'joomla_db' < ~/'joomla-database-'*'.sql' && sync | |
| |
| mariadb --user='root' --password 'joomla_db' < x |
| |
==== Reapply Permissions ==== | ==== Reapply Permissions ==== |
| |
sudo mariadb | mariadb -u 'root' -p |
| |
GRANT ALL PRIVILEGES ON joomla_db.* to 'joomla'@'localhost' IDENTIFIED BY 'x'; | GRANT ALL PRIVILEGES ON joomla_db.* to 'joomla'@'localhost'; |
| |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; |