Tuesday, February 21, 2012

Upgrade PHP on a Linux Server

Configure the YUM repository to look in the correct location for an upgraded PHP RPM. There are many different repositories online that offer upgraded RPMs for PHP so a quick search via Google will be of assistance. For this article we'll be referencing the YUM repositories at webtatic.com
Tell rpm to accept rpm's signed by webtatic

rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy
Add the yum repository information to yum

wget -P /etc/yum.repos.d/ http://repo.webtatic.com/yum/webtatic.repo

Update the existing installation of PHP which will also update all of the other PHP modules installed

yum --enablerepo=webtatic update php

Type Y and let the process complete.
You can now see your current version of PHP using php –v from the shell prompt.

0 comments:

Post a Comment