Graceful upgrade from php53u to php54

Have you tried removing php53u? A simple:

yum remove php53u

Followed by:

yum install php54

Should be doing the trick for you. If it does not, then you can try removing the php53u package(s) using the 'rpm' tool, leaving dependencies intact, but first check the list of packages installed so you can later re-install them from the new php54 repository:

rpm -qa | grep ^php53u.* > /root/php-packages.log

Keep a copy of the list produced. On one of my servers, this list looks like:

$ rpm -qa | grep ^php54*
php54-common-5.4.4-1.ius.el6.x86_64
php54-pdo-5.4.4-1.ius.el6.x86_64
php54-mysql-5.4.4-1.ius.el6.x86_64
php54-fpm-5.4.4-1.ius.el6.x86_64
php54-gd-5.4.4-1.ius.el6.x86_64
php54-cli-5.4.4-1.ius.el6.x86_64
php54-5.4.4-1.ius.el6.x86_64
php54-mbstring-5.4.4-1.ius.el6.x86_64

I can then remove these, without removing dependencies, as such:

for p in $( cat /root/php-packages.log ); do rpm -e --nodeps $p; done

(Note that I am using 'php54' here, you will need to use 'php53u').

Once you've done this, simply install the php54 package(s) via yum:

yum install php54

OR you can some-what automate the re-installation of everything:

yum install $( cat /root/php-packages.log | sed 's/php53u/php54/g' )

Done.

Here's a one liner for the whole thing:

rpm -qa | grep ^php53u.* > /root/php-packages.log; for p in $( cat /root/php-packages.log ); do rpm -e --nodeps $p; done; yum install $( cat /root/php-packages.log | sed 's/php53u/php54' ) -y

I hope this helps :-)


Another way to do this is to use the yum plugin yum-plugin-replace (as described at http://iuscommunity.org/pages/IUSClientUsageGuide.html).

yum install yum-plugin-replace

After that you can replace it via:

yum replace php53u --replace-with php54

This is the recommended way by ius as it will also try to find replacements for all installed dependencies as necessary.