How to Install & Configure Joomla on ubuntu 20.04

Joomla is a free and open-source content management system which is used for publishing web content on websites.Using Joomla, we can create multiples web applications,& blogs .

Joomla is similer to WordPress & both are used for creating the web content application and allows updating, customizing and managing the website.It provides to build dynamic websites.

Install Apache2 Web Service

Update the System.

apt-get update

Install apche2 web service.

apt-get install apache2

Start & Enable Apache2 service.

systemctl start apache2
systemctl enable apache2

Install Mysql database.

Update the System.

apt-get update

Install Mysql database.

apt-get install mysql-server

Start & Enable Mysql service.

systemctl start mysql
systemctl enable mysql

Login to Mysql database.

mysql -u root

Press Enter.

Here is the command output.

Fig 1

Create MySQL user & set the password on MySQL user.

CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

Create Database & provide the CHARSET.

CREATE DATABASE joomla_database charset=utf8mb4;

Provide Grant all Privileges on database to user.

GRANT ALL PRIVILEGES ON joomla_database.* TO'user'@'localhost';

Flush the privileges.

FLUSH PRIVILEGES;

If we want to create MySQL user,database & Set the password without MySQL Login.Run the Following commands.

mysql -u root -e "CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';"
mysql -u root -e "CREATE DATABASE joomla_database charset=utf8mb4;"
mysql -u root -e "GRANT ALL PRIVILEGES ON joomla_database.* TO'user'@'localhost';"
mysql -u root -e "FLUSH PRIVILEGES;"

Install PHP8.0

Update the system

apt-get update

Enable PHP PPA repository

add-apt-repository ppa:ondrej/php 

Install PHP8.0

apt-get install php8.0 

Installing PHP Extensions

apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
apt-get install php-cli php-mysql php8.0-common php8.0-opcache php-gmp php-imagick 
apt-get install openssl php-pgsql php-smbclient php-ssh2 php-sqlite3

Check PHP modules.

php -m 

Check PHP version.

php -v

Here is the command output.

PHP 8.0.8 (cli) (built: ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies

Install Joomla

Go to Apache root directory.

cd /var/www/html

Create a folder.

mkdir folder-name
or
mkdir joomla

Download the Joomla.

wget https://downloads.joomla.org/cms/joomla3/3-9-26/
Joomla_3-9-26-Stable-Full_Package.zip

Extract/Unzip the downloaded file.

apt-get install unzip
&
unzip Joomla_3-9-26-Stable-Full_Package.zip -d /var/www/html/joomla

GIve the following permissions to joomla folder.

chown -R www-data:www-data /var/www/html/joomla
chmod -R 755 /var/www/html/joomla

Configure the apache2 web service.

Create a new configure file.

vim /etc/apache2/sites-available/joomla.conf

Add the given below lines:

<VirtualHost *:80>
   
    ServerAdmin server-admin-name@localhost
    ServerName  server-name.com
    ServerAlias www.server-alias-name
    
    DocumentRoot /var/www/html/joomla/
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    <Directory /var/www/html/joomla/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Enable the config file.

a2ensite joomla.conf

Enable the rewrite mode

a2enmod rewrite

Restart the apache2 web service.

systemctl restart apache2

Access Joomla Web Interface

  • Access Joomla Web Interface by using the URL.
http:/Server-ip/joomla

Here is the output.

  • Provide the Site-name,Email-is, user-name & Password.
  • Click on Next.

 

Fig 1

 

  • Provide the database details such as user-name,database-name & user-password.
  • Click on Next.

 

Fig 2

 

  • Overview all the configurations.

 

Fig. 3

 

  • Click on Install.

 

Fig. 4

 

  • Joomla is Installed.
  • Click on “Remove Installation Folder” as a security precaution.
  • Click on Administrator.

 

Fig. 4

 

  • Provide the user-name & Password.

 

Fig. 6

 

  • Now Joomla is Ready.

 

Fig. 7

 

Leave a Reply