DEV Community

Full Stack Hacker
Full Stack Hacker

Posted on • Edited on

1 1

Install Joomla on Ubuntu with LAMP Stack

Prerequisites

Step 1 — Creating a MySQL Database and User for Joomla

To get started, log into the MySQL root (administrative) account by issuing the following command: sudo mysql -u root -p To create a database, database user, and grant all privileges to the database user run the following commands:

mysql> CREATE DATABASE joomla DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> CREATE USER 'joomlauser'@'%' IDENTIFIED WITH mysql_native_password BY 'your_password';
mysql> GRANT ALL ON joomla.* TO 'joomlauser'@'%';
mysql> FLUSH PRIVILEGES;
mysql> \q

Step 2 - Install PHP and PHP extensions for Joomla

sudo apt update
sudo apt install php libapache2-mod-php php-dev php-bcmath php-intl php-soap php-zip php-curl php-mbstring php-mysql php-gd php-xml

Step 3 - Download Joomla

We will now download the latest version of Joomla from the Official site. Use the following command to download Joomla:

sudo wget https://downloads.joomla.org/cms/joomla4/4-1-5/Joomla_4-1-5-Stable-Full_Package.zip

Extract file into the folder /var/www/html/joomla/ with the following command:

sudo apt -y install unzip
sudo unzip Joomla_4-1-5-Stable-Full_Package.zip -d /var/www/html/joomla

Enable permission for the Apache webserver user to access the files:

sudo chown -R www-data:www-data /var/www/html/joomla/

Step 4 - Configure Apache Web Server for Joomla

Navigate to /etc/apache2/sites-available directory and run the following command to create a configuration file for your installation:

sudo nano /etc/apache2/sites-available/joomla.conf

Add the following content:

<VirtualHost *:80>

ServerAdmin webmaster@your-domain.com

ServerName your-domain.com
ServerAlias www.your-domain.com
DocumentRoot /var/www/html/joomla

<Directory /var/www/html/joomla/>
        Options FollowSymlinks
        AllowOverride All
        Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log
CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined

</VirtualHost>

Save the file and Exit.

Enable the Joomla virtual host: sudo a2ensite joomla.conf

Restart the Apache web server: sudo systemctl restart apache2

Step 5 - Access Joomla 4 Web Installer

Open your browser type your domain e.g http://your-domain.com and complete the required steps to finish the installation. Note: Passwords must have at least 12 characters Enter User, password as created below: Wait for Joomla to install Once the Joomla has been installed, you will get the following screen:

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more