Installing Joomla on a server with CentOS 6.7

Before working with Joomla, you need to have LAMP installed on your server and have root access.

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

~# sudo mkdir temp
~# cd temp

Then you can download the most recent version of Joomla straight from their website. Currently, the latest version is 3.4.3.

~# wget http://joomlacode.org/gf/download/frsrelease/20086/162539/Joomla_3.4.3-Stable-Full_Package.tar.gz

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

~# sudo tar zxvf Joomla_3.4.3-Stable-Full_Package.tar.gz -C /var/www/html

Now configure the settings

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/html/configuration.php
~# sudo chmod 777 /var/www/html/configuration.php

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

Now create the Joomla database and user

log into the MySQL Shell:

~# mysql -u root -p [will prompt for a password]

or with Plesk installed

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

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.

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

Then you need to create the new user. You can replace the database, name, and password, with whatever is best for you:

CREATE USER juser@localhost;
Query OK, 0 rows affected (0.00 sec)

Set a password for your new user:

SET PASSWORD FOR juser@localhost= PASSWORD(“password you want”);
Query OK, 0 rows affected (0.00 sec)

Grant all privileges to the new user:

GRANT ALL PRIVILEGES ON joomla.* TO juser@localhost IDENTIFIED BY ‘password’;
Query OK, 0 rows affected (0.00 sec)

Then refresh MySQL:

FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Exit out of the MySQL shell:

mysql> exit

Restart apache:

sudo service httpd restart
or
sudo /etc/init.d/httpd restart

Access the Joomla installer

Access the Joomla installer going to your domain name or IP address. (e.g. example.co.uk or 127.0.0.1)

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

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

Done. Visit the domain or IP address to see your the new Joomla page.

Advertisements

One thought on “Installing Joomla on a server with CentOS 6.7

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s