Author Topic: HowTo install PHP 5.3.6 on CentOS 5  (Read 10832 times)

Offline admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 296
    • View Profile
HowTo install PHP 5.3.6 on CentOS 5
« on: June 18, 2011, 11:38:20 AM »
This small guide shows you how to install PHP 5.3.6 on CentOS 5 64bit 32 bit, this will work with any control panel like Virtualmin and no need to upgrade apache web server ( httpd ), Using a PHP 5.3.6 RPM for CentOS / RHEL. This guide assumes you have shell access with a super user (root) account to your server.

Install Atomic YUM repository on CentOS
Code: [Select]
wget -q -O atomic http://www.atomicorp.com/installers/atomic |sh

chmod 655 atomic
./atomic


Update / Upgrade PHP
If you already have PHP installed and wish to upgrade to 5.3.6 then run the following:

Code: [Select]
yum update php
Check what packages are going to be updated and proceed if it looks sane.

If you don’t currently have PHP installed then run the following:

Code: [Select]
yum install php
Check what other deps are going to be pulled and proceed if you are happy.

Restart Apache and verify the new version is working using phpinfo.php

Code: [Select]
/etc/init.d/httpd restart
 

For this create a file in a directory served up by Apache containing the following information:

Code: [Select]
<?php phpinfo(); ?>Call the file phpinfo.php and browse to the file in a web browser e.g http://yourdomain.com/phpinfo.php

At the top of the page it should display the PHP version Apache is using.

 

Note you will need to update ionCube Loader to the same version, guide for this coming soon…


If you got error then you may need to update Mysql
Code: [Select]
yum update mysql and then try again.


« Last Edit: June 18, 2011, 11:47:20 AM by admin »

Offline admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 296
    • View Profile
Re: HowTo install PHP 5.2.17 on CentOS 5
« Reply #1 on: June 18, 2011, 11:41:52 AM »
If you wish to use 5.2 like 5.2.17 you will need to manually download it from the Atomic archive and install it.

For i386: http://www6.atomicorp.com/channels/atomic/centos/5EL/x86_64/RPMS/php-5.2.17-1.el5.art.i386.rpm

For x85_64: http://www6.atomicorp.com/channels/atomic/centos/5EL/x86_64/RPMS/php-5.2.17-1.el5.art.x86_64.rpm

And for 86_64 install with yum as shown below, that way yum will pull down the required deps needed for rpm:

Code: [Select]
yum localinstall php-5.2.17-1.el5.art.x86_64.rpm --nogpgcheckAnd for i386 install with:

Code: [Select]
yum localinstall php-5.2.17-1.el5.art.i386.rpm --nogpgcheckIf you are updating PHP on a system you most likely have all the deps and you could in theory use rpm to install using “rpm -Uvh php-5.2.17-1.el5.art.ARCH.rpm” obviously replace ARCH with i386 or x86_64 depending on your architecture.