What is Joomla & Why Should You Use It?
Joomla is the second most popular CMS (Content Management System) used for website building. It is highly customizable and is very user-friendly. Joomla is coded in PHP and it uses a DBMS like MySQL or MariaDB for storing and managing data. Joomla hosting requires LAMP stack (Linux, Apache, MySQL, PHP) to work. There are hundreds of plugins and addons supported by Joomla which is used to customize websites.
In this tutorial, we’ll install Joomla via Command Line Interface (CLI) and configure it via frontend.
Downloading and Installing Joomla
The whole Joomla package is available for free download and we just need to download the Joomla files into the Document Root of your website.
Change the current working directory to the Documet Root of the website/domain.
Download the Joomla Package. Make sure you download the latest stable version to avoid vulnerabilities.
wget http://joomlacode.org/gf/download/frsrelease/17410/76021/Joomla_2.5.7-Stable-Full_Package.tar.gz Extract the tar archive
tar zxvf Joomla_*
This will extract the whole Joomla files to the current working directory. All the Joomla files are now present. Now we need to a configuration file for Joomla and create a MySQL database and user and tie it with the website.
This will create a file called configuration in the current working directory, this is the default configuration file of Joomla.
chmod 777 configuration.php
The above command is to temporarily set full (world-writeable) permission for the configuration file because this file is going to be edited in the configuration steps that we are going to perform later in this tutorial.
Creating MySQL database and user for Joomla website
We need to create a MySQL database and a MySQL user who has the permission to access and modify this database for the Joomla website. We can do this easily via MySQL prompt.
Login to MySQL prompt as the user as root with mysql command.
mysql -u root -p
Provide the MySQL root password when prompted. This will take us to the MySQL command prompt.
CREATE DATABASE joomla;
The above MySQL query will create a database called ‘joomla’. This is the database we are using to use for the website. Now, we need to create a MySQL user who can access and manage this database.
CREATE USER joomlauser@localhost;
Above MySQL query will create a MySQL user named ‘joomlauser’. This being done, we need to set password for this MySQL user.
SET PASSWORD FOR joomlauser@localhost= PASSWORD("password");
After this we need to grand permissions for this user to access the database. Please note that, you’ll have to replace the ‘password‘ with the actual password.
GRANT ALL PRIVILEGES ON joomla.* TO joomlauser@localhost IDENTIFIED BY 'password';
We have now create the MySQL database, user and assigned privileges for it. Refresh MySQL after this.
We can exit the MySQL propmt with the command:
Restart Apache for the chanes to take effect,
service httpd restart
You can take a look at the screenshot given below for a detailed look.
You can cerify if the MySQL user can access the newly created MySQL database as shown in the next screenshot.
This marks the installation process in the backend and we can move ahead with the setup process via frontend. Just access your website in the browser.
This will take us to the Joomla setup wizard as shown in the screenshot.
Select the language and Click ‘Next’. This will take you to the Pre-installation check window.
Just make sure all the pre-requisites are satisfied. Click Next’. This will take you to the License
Just Click ‘Next’ to proceed.
This is the Database Configuration wizard. Just enter the database credentials (MySQL database, MySQL username and password) and move onto the next step. You can either use localhost or the FQDN or the IP of the server as the hostname.
This is the FTP configuration. You can enter the FTP credentials for easy file transfer but it is adviced to leave this page blank and enter your FTP username each time you transfer files because this can give easy file transfer access for attackers.
This is the Joomla admin configuration. We need to enter the desired Joomla admin username and password to access the Joomla admin page. MAke sure you save this data because this is the credentials to access the Joomla admin page. Click ‘Next’.
Installation is now complete. You can remove the installation folder as a security measure. You can browse the default Joomla website and admin page from this page.
And that is all you need to do. If you need any help setting up joomla then we are here 24×7 for you.