Wednesday, November 20, 2013

How to yum install PHP 5.3 for CentOS 5

There is interesting article from Rackspace How to install/upgrade PHP 5.3 for CentOS 5.x

Step 1: Basically, you have to install a repository "webstatic" which is found at 
# wget
# rpm -Uvh latest.rpm
# yum check-update

Step 2: Enable WebStatic (enabled=1)
name=Webtatic Repository $releasever - $basearch

Step 3a: Do a Yum Install
# yum install php php-cli php-gd php-mysql php-mbstring

Step 3b: If you are upgrading, do a yum upgrade
# yum upgrade php

Step 4: Restart the Web Server
# service httpd restart

Step 5: Check the PHP version
[root@web ~]# php -v
PHP 5.3.27 (cli) (built: Jul 13 2013 22:19:28)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

No comments: