It’s easy to upgrade between PHP version is you’re using the IUS repository:
http://iuscommunity.org
Start by determining which version and modules you have already installed:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[root@acme ~]# yum list | grep php | grep installed php52.x86_64 5.2.17-1.ius.el5 installed php52-bcmath.x86_64 5.2.17-1.ius.el5 installed php52-cli.x86_64 5.2.17-1.ius.el5 installed php52-common.x86_64 5.2.17-1.ius.el5 installed php52-devel.x86_64 5.2.17-1.ius.el5 installed php52-gd.x86_64 5.2.17-1.ius.el5 installed php52-imap.x86_64 5.2.17-1.ius.el5 installed php52-ioncube-loader.x86_64 4.0.8-1.ius.el5 installed php52-ioncube-loader-debuginfo.x86_64 4.0.8-1.ius.el5 installed php52-ldap.x86_64 5.2.17-1.ius.el5 installed php52-mbstring.x86_64 5.2.17-1.ius.el5 installed php52-mysql.x86_64 5.2.17-1.ius.el5 installed php52-ncurses.x86_64 5.2.17-1.ius.el5 installed php52-pdo.x86_64 5.2.17-1.ius.el5 installed php52-pear.noarch 1:1.9.2-1.ius.el5 installed php52-xml.x86_64 5.2.17-1.ius.el5 installed php52-xmlrpc.x86_64 5.2.17-1.ius.el5 installed |
So in this case we have the “php52” packages.
Next decide which package set you want to upgrade to. Right no in IUS the choices are:
- php52
- php53u
- php54
IUS provides a great extension for yum which allows for replacing packages:
1 |
yum install yum-plugin-replace |
Now you can replace the PHP version with something like this:
1 |
yum replace php52 --replace-with php53 |
Just change php52 and php53 to the original and new version that you want to replace.
After the install completes run “yum list | grep php | grep installed” again and make sure that you have all the extensions that you need.