PDA

View Full Version : How can I quickly update PHP on RHEL-based system?


Artyom
02-02-2009, 04:21 PM
From this link:http://www.christianmontoya.com/2008/10/01/up grading-php-and-installing-apc-on-centos-5-with-plesk/

Upgrading PHP:

wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh
yum update php

This enables the Atomicorp Yum repository, which includes a stable version of PHP 5.2. If a straight wget & sh seem scary, you can check out this page: Atomicorp Downloads (http://www.atomicorp.com/channels/).

At this point I restart apache, which is usually: service httpd restart. I then verify that PHP is at version 5.2 with:

php -v

The expected output is something like:

PHP 5.2.6 (cli) (built: May 2 2008 16:06:40)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Note: this will work on any rhel-based server (fedora, centos, etc..), even if it does not have Plesk installed.