Download Joomla

Step 1:To start, create a directory where you will keep your Joomla files temporarily:

mkdir temp

Step 2: Switch into the directory

cd temp

Step 3: Then you can go ahead and download the most recent version of Joomla, Currently, the latest version is 2.5.7.

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

 

Step 4: This command will download the zipped Joomla package straight to your user's home directory on the virtual server. You can untar it with the following command, moving it straight into the default apache directory, /var/www

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

Configure the Settings

Step 5:Once the Joomla files are in the web directory, we alter a couple of permissions to give access to the Joomla installer. First create a Joomla configuration file and make it temporarily world-writeable

sudo touch /var/www/configuration.php

sudo chmod 777 /var/www/configuration.php

After the installation is complete, we will change the permissions back down to 755, which will make it only writeable by the owner.

Create the Joomla Database and User

Step 6:Now we need to switch gears for a moment and create a new MySQL directory for Joomla. 

Go ahead and log into the MySQL Shell

mysql -u root -p

Step 7:Login using your MySQL root password. We then need to create the Joomla database, a user in that database, and give that user a new password. Keep in mind that all MySQL commands must end with semi-colon. 

First, let's make the database (I'm calling mine Joomla for simplicity's sake—for a real server, however, this name is not very secure). Feel free to give it whatever name you choose:

CREATE DATABASE joomla;

Query OK, 1 row affected (0.00 sec)

Step 8: Then we need to create the new user. You can replace the database, name, and password, with whatever you prefer

CREATE USER juser@localhost;

Query OK, 0 rows affected (0.00 sec)

Step 9: Set the password for your new user

SET PASSWORD FOR juser@localhost= PASSWORD("password");

Query OK, 0 rows affected (0.00 sec)

Step 10: Finish up by granting all privileges to the new user. Without this command, the Joomla installer will be able to harness the new mysql user to create the required tables

GRANT ALL PRIVILEGES ON joomla.* TO juser@localhost IDENTIFIED BY 'password';

Query OK, 0 rows affected (0.00 sec)

Step 11: Then refresh MySQL

FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

Step 12: Exit out of the MySQL shell

exit

Step 13: Restart apache

sudo service apache2 restart

Access the Joomla Installer

Step 14: Once you have placed the Joomla files in the correct location on your VPS, assigned the proper permissions, and set up the MySQL database and username, you can complete the remaining steps in your browser.

Access the Joomla installer going to your domain name or IP address. (eg. Example.com) 

Once you have finished going through the installer, delete the installation folder per Joomla’s instructions and change the permissions on the config file

sudo rm -rf /var/www/installation/

sudo chmod 755 /var/www/configuration.php