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:

Joomla - Step 1
Install Joomla: Insert Site Name, Description and Administrator Settings

 

 

Joomla - Step 2
Install Joomla: Configure Database Access

 

 

Joomla - Step 3
Install Joomla: Finalize

 

Joomla - Step 4
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.

Share, , Google Plus, Pinterest,

7 Comments

Leave a Reply