How to Install Joomla on a Virtual Server Running Ubuntu 12.04

Introduction

 

Joomla is a free and open-source content management system written in PHP. It uses the object oriented programming techniques for enabling powerful online applications and stores data in a database like MySQL or MS SQL.

In this tutorial, you will learn how to install Joomla on a virtual server running Ubuntu 12.04.

Prerequisites

 

  • This tutorial assumes that you already have LAMP stack installed in your server. If you don’t have LAMP stack on your sever, you can find the steps for doing the set up here.
  • The user should have root privileges so as to have administrative capabilities and permissions. You can check out how to grant root privileges for user here.

Now that you have the user with root privileges and mandatory software, let’s get down to installing Joomla.

Download Joomla

 

First of all, you will have to create a directory for keeping Joomla files.

Create the directory using the command:

mkdir Joomlafiles

Switch to the newly created directory and download the latest version of Joomla from their website. Here, I have used the version 2.5.7.

cd Joomlafiles
wget http://joomlacode.org/gf/download/frsrelease/17410/76021/Joomla_2.5.7-Stable-Full_Package.tar.gz

You will have the Joomla package in zipped format inside user’s home directory in your virtual server. Untar it using the command given below and move it to the default apache /var/www directory.

sudo tar zxvf Joomla_2.5.7-Stable-Full_Package.tar.gz  -C /var/www

 

Configuring Joomla

 

Once Joomla is installed, we can proceed with its configuration. We need to update permissions in order to access Joomla installer.First of all, we will create a Joomla configuration file and will make it temporarily writeable:

sudo touch /var/www/configuration.php
sudo chmod 777 /var/www/configuration.php

Once our set up is completed, we will change the permission of the configuration file to 755 so that only the owner has the privilege to write.

Creation of Joomla Database and User

 

For creating a database and a user for Joomla, we will be logging into the MySQL shell.

Log in with mysql root credentials:

mysql -u root -p

Let’s go ahead and create a database for Joomla. Here, I have named it Joomladb. You may wish to change it with your values.

For Creating a Database:

CREATE DATABASE joomladb;
Query OK, 1 row affected (0.00 sec)

For Creating a User:

CREATE USER [email protected];
Query OK, 0 rows affected (0.00 sec)

For User Password Setup:

SET PASSWORD FOR [email protected]= PASSWORD("password");
Query OK, 0 rows affected (0.00 sec)

Now, you can grant all the privileges for the new user. Without proper privileges, you may end up with installation and database permission issues.

GRANT ALL PRIVILEGES ON joomladb.* TO [email protected] IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

Finish up this step by refreshing and exit out of the shell.

FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)
Exit

Now, restart apache:

sudo service apache2 restart

 

Accessing the Joomla Installer

 

This is the last stage of your Joomla installation. Open your browser and access the page by tailoring your site’s IP address or domain name.

Online Joomla installer will be readily accessible. Go through its steps and you will be done with the installation.

After the installation make sure you have deleted the installation folder as given in Joomla’s instructions. Also change the permission of the configuration file to 755:

sudo rm -rf /var/www/installation/
sudo chmod 755 /var/www/configuration.php

You can verify the set up by accessing Joomla page by visiting your IP address or domain name on your browser.

support2 has written 111 articles

Leave a Reply