Share, , Google Plus, Pinterest,

Print

Posted in:

Install Joomla on CentOS 6

In this post we will learn Step-by-Step how to install Joomla CMS on CentOS 6 minimal Linux installation. Joomla is, as WordPress, a free and open source content management system (CMS). Joomla is written in PHP and stores data in MySQL, MS SQL or PostgreSQL database.

Like WordPress, Joomla enables administrator to quickly create, deploy and manage a website without any specific Script Language knowledge. You can easily download and install Joomla template you like the most and completely change the look and layout of your website. There is also a large list of Joomla extensions available for download from the official Joomla! Extension Directory.

Install Joomla
Install Joomla

Let’s start our Install Joomla on CentOS 6 guide!

1.Install required packages

Install packages required by Joomla (Apache, MySQL, PHP,…). First we want to install all of the packages required by Joomla CMS:

[root@foo1 ~]# yum install httpd mysql-server php php-mysql wget unzip -y

Enable MySQL and Apache services to start at boot:

[root@foo1 ~]# chkconfig mysqld on
[root@foo1 ~]# chkconfig httpd on

2. Download Joomla

Download the latest Joomla and unzip to the desired location. To install Joomla we need to download Joomla zip file from Joomla Homepage. The following commands will download Joomla 3.1.5 and unzip it to /var/www/html/joomla. Please change the download link and unzip directory accordingly if wanted:

[root@foo1 ~]# wget http://joomlacode.org/gf/download/frsrelease/18622/83487/Joomla_3.1.5-Stable-Full_Package.zip
[root@foo1 ~]# unzip Joomla_3.1.5-Stable-Full_Package.zip -d /var/www/html/joomla

Change ownership of /var/www/html/joomla folder and it’s contents to apache user and apache group:

[root@foo1 ~]# chown -R apache:apache /var/www/html/joomla/

3. Configure Apache VirtualHost

First add the lines “ServerName fqdn” and “NameVirtualHost *:80” to Apache global configuration file (/etc/httpd/conf/httpd.conf) with the following echo commands. Please change foo1.geekpeek.net with your servers FQDN:

[root@foo1 ~]# echo “ServerName foo1.geekpeek.net” >> /etc/httpd/conf/httpd.conf
[root@foo1 ~]# echo “NameVirtualHost *:80″ >> /etc/httpd/conf/httpd.conf

Now we can create a new virtual host configuration file at location /etc/httpd/conf.d Please change the VirtualHost information appropriately:

[root@foo1 ~]# cat /etc/httpd/conf.d/joomla.conf
<VirtualHost *:80>
    ServerAdmin info@geekpeek.net
    ServerName foo1.geekpeek.net
    DocumentRoot /var/www/html/joomla
    ErrorLog /var/log/httpd/foo1-error.log
    CustomLog /var/log/httpd/foo1-common.log common
</VirtualHost>

Check Apache configuration for errors and start it:

[root@foo1 ~]# service httpd configtest
Syntax OK
[root@foo1 ~]# service httpd start
Starting httpd:                                            [  OK  ]

4. Create MySQL database and user

To successfully install Joomla, we must first create MySQL database and user. Start your MySQL instance and set root password, if this is your first MySQL initialization:

[root@foo1 ~]# service mysqld start
[root@foo1 ~]# /usr/bin/mysqladmin -u root password 'HardPass'

Connect to MySQL as root and then create database and user with the following commands:

[root@foo1 ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> CREATE DATABASE `joomladb` /*!40100 DEFAULT CHARACTER SET utf8 */;
Query OK, 1 row affected (0.00 sec)
mysql> CREATE USER 'joomlauser'@'localhost' IDENTIFIED BY 'userpass';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON joomladb.* TO 'joomlauser'@'localhost';
Query OK, 0 rows affected (0.00 sec)

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

mysql> quit
Bye

If you have any problems or want additional information on MySQL installation and additional configuration read my Install MySQL on CentOS 6 or Create MySQL Database and Grant Privileges To User posts!

5. Continue in Web Browser

Open your Web Browser and point it to the IP address or FQDN of your server. You will see Joomla installation wizard. follow the steps to complete the installation:

Install Joomla: Insert Site Name, Description and Administrator Settings
Install Joomla: Insert Site Name, Description and Administrator Settings

 

 

Install Joomla: Configure Database Access
Install Joomla: Configure Database Access

 

 

Install Joomla: Finalize
Install Joomla: Finalize

 

Install Joomla: Be sure to remove "installation" folder from your server!
Install Joomla: Be sure to remove “installation” folder from your server!

 

Your Joomla Website is now accessible by visiting http://IPADDRESS/ or http://hostname/ in your browser.

To access administrator dashboard visit http://IPADDRESS/administrator of http://hostname/administrator and log in with your username and password.

  • Nice post, thank you

  • Just to complete the installation of Joomla and other extensions like Sobipro you must use:
    yum -y install httpd mysql-server php php-mysql unzip install php-soap php-curl php-openssl php-xsl php-tidy php-gd

    I’m working with Joomla and Sobipro in order to revamp my website. The libraries needed are the ones in the line above. Thanks for your post!

  • Hollis Francis

    This blog define the installation process of joomla on Cent6 which is very easy to use compare to other processes. .

  • Alex Limbeck

    The pass 3 is not clear.
    Why I must cat the /etc/httpd/conf.d/joomla.conf file ?

    Where I must insert the “VirtualHost” infos ??
    (You wrote the “/etc/httpd/conf.d” folder, but You don’t wrote in which file…)

    • Mitch

      Hi Alex! I cat-ed the file so you would see what my joomla.conf file consists of. So from cat-ing the file i think it is pretty clear you need to make (but it is your choice of filename anyway) a file called joomla.conf in /etc/httpd/conf.d – “cat /etc/httpd/conf.d/joomla.conf”. Regards, Mitch

  • Gerald

    The latest version of joomla says that it needs php 5.4 (5.3.10 min), has this changed since this guide ?
    http://www.joomla.org/technical-requirements.html
    the default version that you get from yum, does is older than this , did you need to do something to upgrad joomla or does it actually work with the default joomla version ?

    thanks for you help,

    G

    • Mitch

      Hi Gerald, as you see Joomla version used in this tutorial was 3.1.5 and the php used was the default from CentOS official repositories. Nothing else was done, no additional php update or something else. Regards, Mitch