Would you like to learn how to do Joomla installation on Ubuntu Linux? In this tutorial, we are going to show you how to install, configure and access the Joomla CMS on a computer running Ubuntu Linux.

• Ubuntu Linux Version: 18.04

Hardware List:

The following section presents the list of equipment used to create this Joomla tutorial.

Every piece of hardware listed above can be found at Amazon website.

Joomla Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Joomla.

Tutorial - NTP on Ubuntu Linux

First, we are going to configure the system to use the correct date and time using NTP.

On the Linux console, use the following commands to set the correct timezone.

# dpkg-reconfigure tzdata

Install the Ntpdate package and set the correct date and time immediately.

# apt-get update
# apt-get install ntpdate
# ntpdate pool.ntp.br

The Ntpdate command was used to set the correct date and time using the server: pool.ntp.br

Let's install the NTP service.

# apt-get install ntp

NTP is the service that will keep our server updated.

Use the command date to check the date and time configured on your Ubuntu Linux.

# date

If the system shown the correct date and time, this means that you followed all the steps correctly.

Tutorial - MySQL Installation on Ubuntu Linux

Now, we can proceed to the installation of the database service.

On the Linux console, use the following commands to install the required packages.

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

After finishing the installation, use the following command to access the MySQL database server.

# mysql -u root -p

Use the following SQL command to create a database named Joomla.

CREATE DATABASE joomla CHARACTER SET UTF8 COLLATE UTF8_BIN;

Use the following SQL command to create a database user named joomla.

CREATE USER 'joomla'@'%' IDENTIFIED BY 'kamisama123';

Give the sql user named joomla permission over the database named joomla.

GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'%';
quit;

Tutorial - Installing Apache on Linux

Now, we need to install the Apache web server and all the required software.

On the Linux console, use the following commands to install the required packages.

# 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

Enable the Apache mod_rewrite and edit the apache2.conf file.

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

Here is the original file, before our configuration.

DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" vhost_combined
LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf

At the end of the file, add the following lines.

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

Here is the new file with our configuration.

DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" vhost_combined
LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
<Directory /var/www/html>
AllowOverride All
</Directory>

Now, you should find the location of the php.ini file on your system.

After finding, you need to edit the php.ini file.

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

Keep in mind that your PHP version and the location of the file may not be the same of mine.

Here is the original file, before our configuration.

file_uploads = On
max_execution_time = 30
memory_limit = 128M
post_max_size = 8M
max_input_time = 60
; max_input_vars = 1000
output_buffering = 4096

Here is the new 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

You should also restart apache manually and verify the service status.

# service apache2 stop
# service apache2 start
# service apache2 status

Here is an example of the APache service status output.

● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Mon 2018-04-23 00:02:09 -03; 1min 4s ago

Tutorial - Joomla Installation on Ubuntu

Now, we need to install the Joomla CMS on Ubuntu Linux.

On the Linux console, use the following commands to download the Joomla package.

# mkdir /downloads/joomla
# cd /downloads/joomla
# 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 all the Joomla files to the root directory of your Apache installation.

Set the correct file permission on all moved files.

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

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://35.162.85.57/joomla

The Joomla web installation interface should be presented.

Select the desired language.

Joomla Installation

You will have to enter the following information:

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

Enter the MySQL connection information to the Joomla database.

Joomla Database

Verify if all Joomla PHP requirements are met successfully.

joomla PHP Requirements

Select the None option and click on the Install button.

Joomla install ubuntu

Wait for the Joomla installation to finish.

After finishing the installation, you need to delete the Joomla installation folder.

On the Linux console, use the following command to delete the installation folder.

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

Click on the Administrator button.

Joomla Summary

After clicking on the Administrator button, you will be sent to the Joomla login screen.

Joomla Login

on the Joomla Login screen, enter the Administrator username and Password.

After a successful login, you will be sent to the Joomla Dashboard.

Congratulations, you have installed Joomla on Ubuntu Linux.