Installing Joomla on Ubuntu Linux

This tutorial will show you all the steps required to install Joomla on Ubuntu Linux.

This tutorial was tested on Ubuntu 18.04.

1. Install MySQL on Ubuntu Linux

Joomla requires a database system to store all its configuration.

Use the Ubuntu APT command to install the MySQL server.

# apt-get update
# apt-get install mysql-server mysql-client

Use the following command to access the MySQL service console.

# mysql -u root -p

On the MySQL console, you need to perform the following tasks:

• Create a database named joomla.
• Create a MySQL user account named joomla.
• Give full control over the joomla database to the joomla user.

CREATE DATABASE joomla CHARACTER SET UTF8 COLLATE UTF8_BIN;
CREATE USER 'joomla'@'%' IDENTIFIED BY 'kamisama123';
GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'%';
FLUSH PRIVILEGES;
quit;

2. Install Apache on Ubuntu Linux

Joomla requires a web server with PHP support to present its web pages.

Use the Ubuntu APT command to install the Apache server.

# apt-get update
# apt-get install apache2 php7.2 php7.2-mysql libapache2-mod-php7.2
# apt-get install php7.2-mbstring php7.2-xml php7.2-zip

Optional. Install the Apache most used PHP modules.

# apt-get install php7.2-curl php7.2-gd php7.2-readline php7.2-ldap
# apt-get install php7.2-bz2 php7.2-curl php7.2-cli php7.2-xmlrpc
# apt-get install php7.2-json php7.2-opcache php-cas

Enable Apache mod_rewrite.

Edit the apache2.conf file.

# a2enmod rewrite
# vi /etc/apache2/apache2.conf

Add the following lines at the end of apache2.conf

<Directory /var/www/html>
AllowOverride All
</Directory>

Find the location of the PHP configuration file on your system.

Edit the php.ini configuration file.

# updatedb
# locate php.ini
# vi /etc/php/7.2/apache2/php.ini

Your PHP version may not be the same as ours.

Your PHP configuration file location may not be the same as ours.

Here is the file with our configuration.

file_uploads = On
max_execution_time = 300
memory_limit = 256M
post_max_size = 32M
max_input_time = 60
max_input_vars = 4440
output_buffering = off

Restart the Apache web server manually.

# service apache2 restart
# service apache2 status

Verify the Apache service status.

● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Mon 2018-12-03 03:41:12 -02; 2 days ago

3. Install Joomla on Ubuntu Linux

After finishing the MySQL and the Apache configuration, we can start the Joomla installation.

Download the Joomla latest version and extract the package.

# cd /tmp
# wget -O joomla_3-9-1-stable-full_package-tar.gz https://downloads.joomla.org/cms/joomla3/3-9-1/joomla_3-9-1-stable-full_package-tar-gz?format=gz
# tar -zxvf joomla_3-9-1-stable-full_package-tar.gz

Move the Joomla folder inside your Apache root drive directory.

Give the www-data user full control over the Joomla directory and its files.

# mv joomla /var/www/html/
# chown www-data.www-data /var/www/html/joomla/* -R

4. Configure Joomla on Ubuntu Linux

Open your browser and enter the IP address your web server plus /joomla.

In our example, the following URL was entered in the Browser:

• http://200.200.200.200/joomla

The Joomla installation wizard will be presented.

Enter the following information:

• Your website Name.
• Your website Description.
• Your administrator username.
• Your administrator password.
• Your administrator e-mail account.

Joomla Installation

Enter the MySQL connection information to the Joomla database.

Joomla Database MySQL

Verify if all Joomla requirements were met successfully.

Joomla Requirements

Select the None option and click on the Install button.

Joomla Installation Ubuntu

Wait for the Joomla installation to finish.

Congratulations! Joomla is installed on your system.

On the Linux console, delete the Joomla installation file.

# rm /var/www/html/joomla/installation -rf

Click on the Administrator button to access the Joomla Login Screen.

Joomla Installation Summary

Click on the Administrator button to access the Joomla Login Screen.

After a successful login, The Joomle dashboard will be displayed.