Before installing PHP 5.6, apply any existing updates available for your distribution: root@server: # yum check-update root@server: # yum update Also, this is a good moment to get (and save somewhere) a list of our installed packages (in case we need to rollback): root@server: /sources # rpm -qa grep php php-mbstring-5.4.16-36.1.el72.1.x8664 php-mysql-5.4.16-36.1.el72.1.x8664 (.) php-gd-5.4.16-36.1.el72.1.x8664 php-odbc-5.4.16-36.1.el72.1.x8664 Download and Install Remi's repository files. Download and install the 'repos' package: root@server: # wget root@server: # rpm -Uhv remi-release-7.rpm warning: remi-release-7.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY Preparing.
Jun 11, 2015 - 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29. Provision new CentOS 7 machine. Download and Install DokuWiki.
################################# 100% Updating / installing. 1:remi-release-7.2-1.el7.remi ################################# 100% Now enable the repository in Yum by setting enable=1 for the remi-php56 repo: root@server: # vim /etc/yum.repos.d/remi.repo (.) remi-php56 name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch mirrorlist=enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi (.) Replace PHP 5.4 with PHP 5.6. Install the packages not as a Software Collection but as 'Replacement Packages': root@server: # yum update This yum update command should upgrade all our PHP packages.
If it does not upgrade them or we don't have PHP already installed, then do: root@server: # yum -enablerepo=remi-php56 install php-cli Yum will remove the old packages and install the new ones. For me it was clean and simple, for other cases (lots of PHP packages or modules), it might require some manual work (uninstall some old package previously or similar). We can get some PHP warnings like: PHP Warning: Module 'xmlwriter' already loaded in Unknown on line 0 or PHP Warning: PHP Startup: mbstring: Unable to initialize module. This happens while the modules are being upgraded. You can ignore these warnings: the only module that will still providing errors/warnings when we restart Apache will be APC: PHP Warning: PHP Startup: apc: Unable to initialize module Disable APC and enable OPCACHE instead.
APC does not work anymore with PHP =5.5 (only the user-land cache APCu still works), so the best approach is now to use PHP's integrated OPCACHE.