Install php5.3 in CentOS and RedHat

Install php5.3 in CentOS and RedHat

In this post we are going to see how to install php5.3 CentOS and Redhat.

As you all know php is one of the major programming language even facebook is made up of php programming language. If you are using php in you official environment then you should know how to install php in to you machine first. Here i have explained how to install php 5.3 in CentOS and Redhat.

 

Install php5.3 in CentOS and RedHat

 

In CentOS 5.8 php5.3 version is available by default in yum repository but in Redhat 5 php5.1 available by default. In Cent OS yum repository server is configured by default but in Redhat we need to configure yum repository server manually. RPM packages are available in Redhat server DVD we can configure yum repository server using that.

First lets see how to install php5.3 in CentOS 5.8.

Lets cross verify whether any php package is already installed in the machine. If php packages are not installed proceed further with installation. Using yum list all command we can find the available php53 packages. Select the required php packages from list according to you requirement. Then install php53. Lets see this with an example.

rpm -qa | grep -i php
yum list all | grep -i php53
yum install php53.x86_64 php53-common.x86_64  php53-cli.x86_64 php53-devel.x86_64 php53-mysql.x86_64 php53-ldap.x86_64 php53-odbc.x86_64
rpm -qa | grep -i php53

 

Install php5.3 in CentOS and RedHat

Php package is not installed already so we can proceed with installing php5.3. Select the required package from “yum list all | grep -i php” command and install it using “yum install  <package name> <package name> …”.

Install php5.3 in CentOS and RedHat

At the time of installation it will ask you to give ” Y ” to proceed further with installation. Give Y (yes) at the time.

Install php5.3 in CentOS and RedHat

Done we have installed php5.3 successfully in CentOS 5.8. You can check the installed php package using “rpm -qa | grep php” and you can check installed php modules using phpinfo() function.

Lets install php5.3 in Redhat 5 Linux.

As I already said in Redhat php-5.1 is available as default. To install php-5.3 we need to download it from internet. It will be difficult to download all php-5.3 rpm from different location. so we can download rpm from CentOS central repository link.

RPM repository link for 64 bit

http://199.187.126.90/centos-5/5/updates/x86_64/RPMS/

PRM repository link for 32 bit

http://199.187.126.90/centos-5/5/updates/i386/RPMS/

Install php5.3 in CentOS and RedHat

 

Download the required php packages and start installing it. All the packages will be in rpm format so we have to install using command “rpm -ivh <packagename>”. To know more about rpm check post rpm command with examples in linux unix.




Leave a Reply

Your email address will not be published. Required fields are marked *