Joomla installation in Ubuntu

Joomla installation in Ubuntu


Prerequisites:
Ubuntu 20.04
Administrative sudo user with root privileges

Step 1: Connect to your Server
Once logged in, make sure that your server is up-to-date by running the following commands:

sudo apt-get update
sudo apt-get upgrade

Step 2: Install Apache web server and PHP
Joomla requires a webserver to function. Apache is a fast and secure web server and one of the most popular and widely used web servers in the world. You can install it from the official Ubuntu repositories running the following command:

sudo apt install apache2

After installing Apache, the commands below can be used to stop, start and enable Apache services to always start up every time your server starts up.

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

To verify that Apache is running, execute the following command:

sudo systemctl status apache2

installation of joomla 4.0 on ubuntu 20.04
Since Joomla is built on PHP, you will need to install PHP as well. You will install PHP and other supporting packages by running the following command:

sudo apt install php php-common libapache2-mod-php php-cli php-fpm php-mysql php-json php-opcache php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-zip

To verify that PHP is successfully installed, run the following command:

php -v

You should get the following output on your screen:

PHP 7.4.3 (cli) (built: Aug 13 2021 05:39:12) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

Once all the packages are installed, we will need to edit the php.ini file and modify some settings: 

If PHP 7.4 then run  below command
sudo gedit /etc/php/7.4/apache2/php.ini

If PHP 8.1 then run  below command
sudo gedit /etc/php/8.1/apache2/php.ini

memory_limit = 512M
upload_max_filesize = 256M
post_max_size = 256M 
max_execution_time = 300
output_buffering = off
date.timezone =  Asia/Kolkata or America/Chicago

Step 3: Install MariaDB
Joomla uses MariaDB/MySQL as a database.  To install the MariaDB database server, enter the following command:

sudo apt install -y mariadb-server mariadb-client

Secure your installation
When the installation is complete, run the following command to secure your installation:

mysql_secure_installation

This script will set the MariaDB root password, disable remote root login and remove anonymous users as shown below:

Enter current password for root (System Password):
Set root password? [Y/n] Y
Enter new password:         (Note down the password for login)
Re-enter new password: 
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

Step 4: Create a Joomla Database
Next, you will need to create a database and user for the Joomla installation. First, connect to the MariaDB shell with the following command:

mysql -u root -p

Once connected, create a database and user using the following command:

CREATE DATABASE joomla;
GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'localhost' IDENTIFIED BY  'StrongPassword';
FLUSH PRIVILEGES;
EXIT;

At this point, MariaDB is installed and configured for Joomla. You can now proceed to install Joomla.

Step 5: Install Joomla
Now that you have your environment completely set up, you can proceed with the Joomla installation. At the time of writing this article, the latest version of Joomla is 4.0.3. You can download it from the Joomla! 4.0 downloads page using the following command:

wget https://downloads.joomla.org/cms/joomla4/4-0-3/Joomla_4-0-3-Stable-Full_Package.zip

Once the download is completed, unzip the archive and move the extracted files to the /var/www/html/joomla directory, which will be the root directory of your new Joomla site:

sudo unzip Joomla_4-0-3-Stable-Full_Package.zip -d /var/www/html/joomla

Finally, change the ownership of the /var/www/html/joomla directory to the www-data user:

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

Step 6: Configure Apache for Joomla
Next, you will need to create an Apache virtual host configuration file for the Joomla installation. You can create it with the following command:

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

Add the following lines:

<VirtualHost *:80>
     ServerAdmin admin@libsciinfo.com
     DocumentRoot /var/www/html/joomla/
     ServerName libsciinfo.com
     ServerAlias www.libsciinfo.blogspot.com

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

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save and close the file then activate the Joomla virtual host and  restart the Apache service to apply the changes:

a2ensite joomla.conf
systemctl restart apache2

Open http://your_domain.com (http://localhost/) in your favorite web browser and follow the on-screen instructions to complete the Joomla installation.

1.     Select your language and enter your site name.
2.     Insert username and password for your Joomla 4.0 administration account. (Note: Passwords must have at least 12 characters.)

Example
     Super User: Marimuthu R
     User Name: marimuthuofl
     Password: Admin@12345678
     Mail ID: marimuthudlis@gmail.com

3.  Database type: MySQLi
     Host Name: localhost
     User Name: joomla
     Password: Admin@123
     Database Name: joomla
     Leave default other setting

4.     Complete & Open Admin


For Administrator http://localhost/administrator/



Source:

Comments

Popular posts from this blog

Install Dspace 7.2 on Ubuntu 22.04 LTS

How to delete library data in koha using the command line

Koha INSTALLATION

Total views