How to install Joomla 4.2.2 on Ubuntu 20.04?
Overview
Joomla is a Content Management System (CMS) that is open-source and used to create stunning websites and potent online applications. It is built on PHP and frequently set up to use MariaDB/MySQL databases.
This tutorial will guide you with the steps to set up Joomla 4.2.2 on Ubuntu 20.04.
Prerequisites
There are certain prerequisites that need to be met before you begin:
PHP 5.3.10 or newer (recommended 7.3+)
MySQL 5.1+ (recommended 5.5.3)
Apache 2.0 or above
A user account with 'sudo' or administrative rights.
Internet accessibility
Note: If the required environment is already set, you may skip directly to Step 5.
Get Started
Step 1: Login as: ubuntu
Login through SSH on an SSH client like MobaXterm or Putty and run the command below to make sure your system is of the latest version:
1. To update the package list with the latest available versions:
2. To actually upgrade and install the latest versions of packages that are already installed:
Step 2: PHP and Apache Server Installation
To run, Joomla needs a web server. Here, we will use the Apache server, which is commonly used worldwide. The following command can install the setup from Ubuntu's official repositories:
1. Apache installation:
2. When the server boots up after Apache installation, you can use the following commands to start, stop, and activate Apache services:
3. Verify Apache's running status by executing the following command:
You have to carry out PHP installation as well because Joomla is based on PHP. Also, Joomla templates usually contain PHP statements, so it is necessary for building webpages.
1. By executing the following command, you'll install PHP, plus additional related packages:
2. Run the command below to verify the PHP if it is installed successfully:
Step 3: Install MariaDB
For this tutorial, we will set up the MariaDB server, a derivative of MySQL, since installing a relational database server is necessary because Joomla needs database to store its data on the backend. Run the following command to install the DB:
Securing database installation
1. Enter as the root user first, using the below command:
2. Set a new password for the root user with the following command:
3. Run the following command to protect the installation:
After the installation is finished, follow the instructions for setting up the privileges of the database:
Now, you need a storage solution for keeping your Joomla site's data.
Step 4: Database creation for Joomla
1. As the next step, a user and database must be created for its installation. To establish the connection to MariaDB initially, use the following command:
2. Create a DB, user and password by using the following script:
MariaDB has now been installed and is ready for Joomla installation.
Step 5: Joomla Installation
1. As your environment has been configured, you may start the installation.
Download the Joomla package from Joomla! 4.2.2 downloads page with the command below:
Extracted files should be moved to the directory, whose path is /var/www/html/joomla, which will serve as root directory for your Joomla site, after you have finished unzipping the archive.
2. First, we need to install the unzip library, with the following command:
3. For unzipping the package, run the following command:
4. Run the following command to give the www-data user proprietorship ofcthe /var/www/html/joomla directory:
Step 6: Apache Configuration for Joomla
1. To install Joomla, you must build a virtual host file for maintaining Apache's configurations. This file will help to set the configurations to allow more than one website on a single server. The following command will aid you in creating it:
2. Mention the script below in the configuration file created above:
After saving and closing the file, run the following command to activate Joomla’s virtual host:
Apply the changes next by restarting the Apache server with the following command.:
Now, you need to access http://your_domain.com (<your domain> will be your IP address) in your web browser.
Follow the instructions on the screen to finish the installation:
Enter the name of your site and choose your desired language, as shown in the image below:
For Joomla 4.2.2 administrator account, configure the name, username, password, and email address of the Super User.
Note: The passwords must be 12 characters long at least.
3. Set up the database configuration. The table below the image explains the required fields.
After filling out the details, click on Install Joomla.
You'll land upon the additional settings page, from where you can view the Joomla 4.2.2 home page by clicking the 'Open Site' button.
Now, you will land on the login page, from where you can get started by entering your credentials.
Conclusion
Joomla 4.2.2 is now properly installed on Ubuntu 20.04. You may take a reference from the official Joomla manual for further details and queries on Joomla installation.
Last updated