Upgrade PHP 4 to PHP 5 on VPS

From Lunarpages Web Hosting Wiki
Jump to: navigation, search

Please use the following steps to get PHP upgrade to version 5:

1. Login to the server as root via ssh 2. Install yum using the following commands:

rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm
rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm

2. Then add Atomic repository that contains PHP for Linux Plesk servers and update PHP and MySQL:

rpm -ivh http://www.atomicorp.com/channels/atomic/centos/4/i386/RPMS/atomic-release-1.0-7.el4.art.noarch.rpm
rpm --nodeps -e php-domxml
yum update php*
yum update mysql*
yum install php-xml

3. Remove yum if you are done with software installations using "yum upgrade" or installing other packages can break the VPS:

rpm -e `rpm -aq | grep yum`
Share |
Want to read this in another language?