CMS
Joomla

Joomla

Joomla is an open-source Content Management System (CMS) used to easily create and manage dynamic websites. Joomla is written in PHP and uses MySQL or MariaDB as its database. This CMS is known for its flexibility, built-in multilingual support, and large community. Joomla provides a variety of templates and extensions that allow users to customize the appearance and functionality of their website without needing advanced programming skills.

1. System Requirements

System requirements for Joomla v5:

  • PHP 8.1+
  • PHP extensions: json, simplexml, dom, zlib, gd, mysqlnd or pdo_mysql or pdo_pgsql
  • MySQL 8.0.13+ or MariaDB 10.4+
  • PostgreSQL 12.0+
  • Apache or Nginx

Before starting the deployment, prepare:

  • A VPS or server with Ubuntu LTS OS
  • SSH access to the server
  • A domain already pointed to the server

2. Server Preparation

Update the system

sudo apt update 
sudo apt upgrade -y

Install MariaDB

sudo apt install mariadb-server -y

Add the PPA ondrej/php repository

sudo add-apt-repository ppa:ondrej/php -y
sudo apt upgrade -y

Install PHP 8.3 and the required extensions

sudo apt install php8.3 php8.3-cli php8.3-common \
  php8.3-apcu php8.3-mbstring php8.3-gd php8.3-intl \
  php8.3-xml php8.3-soap php8.3-bcmath php8.3-mysql php8.3-zip \
  php8.3-curl php8.3-tidy php8.3-imagick php-pear -y

3. Create Database

Log in to MariaDB

sudo mysql

Create a database contohcom and user 'contohcom'@'localhost'

CREATE DATABASE contohcom;
CREATE USER 'contohcom'@'localhost' IDENTIFIED BY 'rahasia';
GRANT ALL PRIVILEGES ON contohcom.* TO 'contohcom'@'localhost';
FLUSH PRIVILEGES;
EXIT;

4. Web Server Configuration

Apache

Install Apache

sudo apt install apache2 libapache2-mod-php8.3 -y

Create a virtual host

sudo nano /etc/apache2/sites-available/contoh.com.conf

Enter the configuration

<VirtualHost *:80>
    ServerName www.contoh.com
    ServerAlias contoh.com
    DocumentRoot /var/www/contoh.com
    <Directory /var/www/contoh.com>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog /var/log/apache2/contoh.com_error.log
    CustomLog /var/log/apache2/contoh.com_access.log combined
</VirtualHost>

Enable the module and virtual host

sudo a2enmod rewrite
sudo a2ensite contoh.com.conf
sudo systemctl restart apache2

Install certbot for Apache

sudo apt install certbot python3-certbot-apache -y

Request an SSL certificate

sudo certbot --non-interactive \
    -m [email protected] \
    --agree-tos \
    --no-eff-email \
    --apache -d contoh.com -d www.contoh.com \
    --redirect	

Nginx

Install Nginx

sudo apt install nginx php8.3-fpm -y

Create a virtual host

sudo nano /etc/nginx/sites-available/contoh.com.conf

Enter the configuration

server {
    listen 80;
    server_name www.contoh.com contoh.com;
    root /var/www/contoh.com;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        try_files $fastcgi_script_name =404;
        include fastcgi_params;
        fastcgi_pass unix:/run/php/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param DOCUMENT_ROOT
        $realpath_root;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    }

    access_log /var/log/nginx/contoh.com_access.log;
    error_log /var/log/nginx/contoh.com_error.log;
}

Enable the virtual host

sudo ln -s /etc/nginx/sites-available/contoh.com.conf /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Install certbot for Nginx

sudo apt install certbot python3-certbot-nginx -y

Request an SSL certificate

sudo certbot --non-interactive \
    -m [email protected] \
    --agree-tos \
    --no-eff-email \
    --nginx -d contoh.com -d www.contoh.com \
    --redirect	

5. Download Joomla

Download Joomla v5.2.2

wget https://update.joomla.org/releases/5.2.2/Joomla_5.2.2-Stable-Full_Package.zip

Install unzip if not already available

sudo apt install unzip -y

Extract Joomla*.zip

sudo unzip Joomla*.zip -d /var/www/contoh.com

Change the user and group of the directory

sudo chown -R www-data:www-data /var/www/contoh.com

6. Install Joomla

Access https://www.contoh.com to install Joomla.

  1. Enter the name of your Joomla site. *: Enter the website name.
  2. Click Setup Login Data.
  3. Enter the real name of your Super User. *: Enter the name for the Super User (admin) account.
  4. Set the username for your Super User account. *: Enter the Super User account username.
  5. Set the password for your Super User account. *: Enter the Super User account password.
  6. Enter the email address of the website Super User. *: Enter the Super User account email address.
  7. Click Setup Database Connection.
  8. Enter the database username you created or a username provided by your host. *: Enter the database username.
  9. Enter the database password you created or a password provided by your host.: Enter the database password.
  10. Enter the database name. *: Enter the database name.
  11. Click Install Joomla.

If the Joomla installation is complete, the message Congratulations! Your Joomla site is ready. will be displayed.