Operating Systems > Lunix & Unix

HowTo install PHP 5.3.6 on CentOS 5

(1/1)

admin:
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: ---wget -q -O atomic http://www.atomicorp.com/installers/atomic |sh

chmod 655 atomic
./atomic


--- End code ---

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


--- Code: ---yum update php
--- End code ---

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: ---yum install php
--- End code ---

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: ---/etc/init.d/httpd restart
--- End code ---

 

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


--- Code: ---<?php phpinfo(); ?>
--- End code ---
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: ---yum update mysql
--- End code ---
and then try again.


admin:
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: ---yum localinstall php-5.2.17-1.el5.art.x86_64.rpm --nogpgcheck
--- End code ---
And for i386 install with:


--- Code: ---yum localinstall php-5.2.17-1.el5.art.i386.rpm --nogpgcheck
--- End code ---
If 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.

Navigation

[0] Message Index

Go to full version