How to install Joomla 1.5 on CentoOS 5

We have been used a shared hosting service. We noticed that performance is slower due to cpanel, WHM and any management package. To verify it, we built CentOS server on VMware ESXi  Server. Here is the procedure to complete install Joomla 1.5 on dedicated server.

A. Let’s assume you have installed CentOS 5.

B. Check SSH demon that is pre-installed is running properly. Of course you can use telnet, but better not to. Create a account to acces CentOS from remote. You don’t want to us root account to access the server, even this is testing server.

 

C. Review what components need to be installed.

PHP 5.2
MySQL 5.1
Apache 2.2

Reference; http://www.joomla.org/technical-requirements.html

 

D. Install Apaches, If you already installed httpd while installing CentOS as server package, you can skip this.

CentOS5_Joomla# yum –install httpd
CentOS5_Joomla# /etc/init.d httpd start ; To start web server
CentOS5_Joomla# /etc/init.d httpd restart ; To restart web server
CentOS5_Joomla# /etc/init.d httpd reload ; To reload web server

 

E. Install or upgrade PHP(CentOS comes with PHP Version 5.1.6)

Create file at /etc/yum.repos.d/upgrade-php.repo and copy below statement

"[c5-testing]
  name=CentOS-5 Testing
  baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
  enabled=1
  gpgcheck=1
  gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
  includepkgs=php*
"
 

CentOS5_Joomla# yum update ; type "Y" on following prompt.
CentOS5_Joomla# /etc/init.d httpd restart ; you must restart httpd with any php or mysql changes
CentOS5_Joomla# php -v ; to verify

Reference; http://wiki.centos.org/HowTos/PHP_5.1_To_5.2

 

F. install or upgrade MySQL

CentOS5_Joomla# mysql –version ; To verify current verison
CentOS5_Joomla# which mysql ; to see where mysql is installed

1. Remove MySQL if you get error

"ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)"

CentOS5_Joomla# yum list | grep MySQL or mysql ; to see list of MySQL packages

CentOS5_Joomla# yum erase mysql
CentOS5_Joomla# yum erase mysql-5.0.77-4.el5_4.1.x86_64
:

:

2. Install MySQL

CentOS5_Joomla# yum install mysql-server
CentOS5_Joomla# yum install php-mysql
CentOS5_Joomla# yum install php php-pear

CentOS5_Joomla# /sbin/chkconfig –levels 235 mysqld on

CentOS5_Joomla# /etc/init.d/mysqld start ; If you get error, install mysql again.

 

4. Remove default setup and security review

CentOS5_Joomla# /usr/bin/mysql_secure_installation

You could setup MySQL root password during dialogue prompt.

To manual setup,

CentOS5_Joomla# mysqladmin -u root password mysqldata

 

5. To access MySQL server. Type:

CentOS5_Joomla# mysql -u root -p ; p option for password input

Once MySQL client is running, you should get the mysql> prompt.
Type the following at this prompt to see

mysql> show databases;
+——————–+
| Database           |
+——————–+
| information_schema |
| mysql              |
+——————–+
2 rows in set (0.00 sec)

mysql>


6. Create the joomla database

mysql> create database joomla_db;
Query OK, 1 row affected (0.00 sec)

mysql> show databases;
+——————–+
| Database           |
+——————–+
| information_schema |
| joomla_db          |
| mysql              |
+——————–+
3 rows in set (0.00 sec)

7. permission changes

The database is created by the root and so will not be accessible to
any other user unless permitted by the root. Thus, in order to use
this database from my account (ex, admin), I have to set the permissions by issuing the following command:

mysql> GRANT ALL ON joomla_db.* TO admin@localhost IDENTIFIED BY "password" \g
Query OK, 0 rows affected (0.00 sec)

 

Referenece; http://forums.mysql.com/read.php?11,153632
http://www.debuntu.org/how-to-create-a-mysql-database-and-set-privileges-to-a-user
http://www.webdevelopersnotes.com/tutorials/sql/mysql_primer_creating_a_database.php3

 



G. Upload Joomla package to CentOS servier. and extract it under /var/www/html/

H. Unzip the package

 

CentOS5_Joomla# unzip Joomla_1.5.15-Stable-Full_Package.zip

 

I. Open a broswer and http://localhost, then you should see Joom installation page.

http://localhost

 

J. Troubleshooting.

– No MySQL connection indication during Joomla installation.  You need to install php-mysql package or resintall that.

 

-If you got "Error: the XML response that was returned from the server is invild" message, see article " Joomla Error:the xml response that was returned from the server is invalid "


 

Leave a Reply