How to Install Joomla CMS on Ubuntu 20.4.1

To install Joomla CMS on Ubuntu 20.4.1

Introduction:

Joomla is a free and open-source content management system (CMS) that allows the publishing of web content. The software is built on a model–view–controller framework for web applications that is independent of a CMS, allowing you to build powerful online applications.

Installation process:

Run lsb_release command to check the installed version of OS as follows.

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

Install Apache:

root@linuxhelp:~# apt install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom

Start the apache by following command

root@linuxhelp:~# systemctl start apache2

Install PHP modules by using below commands:

root@linuxhelp:~# apt install php php-xml php-mysql php-mbstring php-zip php-soap php-sqlite3 php-curl php-gd php-ldap php-imap php-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libapache2-mod-php7.4 libc-client2007e libonig5 libzip5 mlock php7.4 php7.4-cli php7.4-common php7.4-curl php7.4-gd
  php7.4-imap php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-soap php7.4-sqlite3
  php7.4-xml php7.4-zip

Install mysql by using below command:

root@linuxhelp:~# apt install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libfcgi-perl libhtml-template-perl
  libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client-8.0 mysql-client-core-8.0 mysql-server-8.0
  mysql-server-core-8.0
Suggested packages:
  libipc-sharedcache-perl mailx tinyca
The following NEW packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libfcgi-perl libhtml-template-perl
  libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client-8.0 mysql-client-core-8.0 mysql-server mysql-server-8.0

Create database for Joomla CMS:

root@linuxhelp:~# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.22-0ubuntu0.20.04.3 (Ubuntu)
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database joomla;
Query OK, 1 row affected (0.00 sec)
mysql> use joomla;
Database changed
mysql> 
mysql> create user 'user'@localhost identified by '123456';
Query OK, 0 rows affected (0.01 sec)
mysql> grant all privileges on joomla.* to 'user'@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> exit
Bye

Change the directory to apache’s root directory

root@linuxhelp:~# cd /var/www/

Create directory for Joomla CMS:

root@linuxhelp:/var/www# mkdir joomla

Change the directory to Joomla directory

root@linuxhelp:/var/www# cd joomla

Download Joomla cms by using below command:

root@linuxhelp:/var/www/joomla# wget https://downloads.joomla.org/cms/joomla3/3-9-4/Joomla_3-9-4-Stable-Full_Package.zip?format=zip
--2020-12-03 14:47:57--  https://downloads.joomla.org/cms/joomla3/3-9-4/Joomla_3-9-4-Stable-Full_Package.zip?format=zip
Resolving downloads.joomla.org (downloads.joomla.org)... 72.29.124.146, 2602:fd32:1:6a6f:6f6d:6c61:1:1
Connecting to downloads.joomla.org (downloads.joomla.org)|72.29.124.146|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://s3-us-west-2.amazonaws.com/joomla-official-downloads/joomladownloads/joomla3/Joomla_3.9.4-Stable-Full_Package.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZ6S3Q3YQHG57ZRA%2F20201203%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20201203T091757Z&X-Amz-Expires=60&X-Amz-SignedHeaders=host&X-Amz-
Resolving s3-us-west-2.amazonaws.com (s3-us-west-2.amazonaws.com)... 52.218.209.64
Connecting to s3-us-west-2.amazonaws.com (s3-us-west-2.amazonaws.com)|52.218.209.64|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13869429 (13M) [application/zip]
Saving to: ‘Joomla_3-9-4-Stable-Full_Package.zip?format=zip’
Joomla_3-9-4-Stable-Full_Packag 100%[=====================================================>]  13.23M   307KB/s    in 19s

Extract the Zip file by using below command:

root@linuxhelp:/var/www/joomla# unzip Joomla_3-9-4-Stable-Full_Package.zip\?format\=zip
Archive:  Joomla_3-9-4-Stable-Full_Package.zip?format=zip
  inflating: LICENSE.txt             
  inflating: README.txt              
   creating: administrator/
   creating: administrator/cache/
  inflating: administrator/cache/index.html  
   creating: administrator/templates/
   creating: administrator/templates/system/
  inflating: administrator/templates/system/component.php  
   creating: administrator/templates/system/css/
  inflating: administrator/templates/system/css/system.css  
  inflating: administrator/templates/system/css/error.css  
  inflating: administrator/templates/system/index.php  
   creating: administrator/templates/system/images/
 extracting: administrator/templates/system/images/calendar.png

Give the Ownership and permissions to Joomla directory

root@linuxhelp:/var/www/joomla# chown -R www-data. ./
root@linuxhelp:/var/www/joomla# chmod -R 755 ./

Create a virtualhost for Clipper CMS:

root@linuxhelp:/var/www/joomla# vim /etc/apache2/sites-available/joomla.conf

Disable default access

root@linuxhelp:/var/www/joomla# a2dissite 000-default.conf
Site 000-default disabled.

To activate the new configuration, you need to run:
  systemctl reload apache2

Enable site access

root@linuxhelp:/var/www/joomla# a2ensite joomla.conf
Enabling site joomla.
To activate the new configuration, you need to run:
systemctl reload apache2

Enable rewrite module

root@linuxhelp:/var/www/joomla# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Once it is completed, Restart the Apache Web Server by running the following command

root@linuxhelp:/var/www/joomla# systemctl restart apache2

Once completed above step goto browser type URL Create account Configure database Overview and click Install Click to open admin page Login as admin It will show the dashboard of Joomla CMS

With this installation of Joomla Cms on ubuntu comes to end.

FAQ
Q
Does Joomla CMS require to install Database for it?
A
Yes Joomla requires a Database to store its files and content.
Q
How to enable host file entry on Joomla?
A
To enable host file entry for Joomla,
# vim /etc /hosts
Q
What are the required Php extensions for Joomla?
A
The required PHP extensions for Joomla are as follows,
php-soap php-zip php-mysql php-curl php-xml php-mcrypt php-gd php-fpm
Q
Is Joomla OpenSource?
A
Joomla is a free, open-source, and popular content management system.
Q
What is the official link for Joomla to download the latest version?
A
To download Joomla CMS follow this link, https://downloads.joomla.org/