Just upgraded my server that hosts my freehandicaptracker.net web app and API plus a few other small apps to PHP 7! Went pretty smoothly, just a couple steps.
CentOS 6.8, logged in via ssh as root:
1) You will need a source for the php 7 binaries, since they are not yet part of the base RHEL / CentOS repository. I would recommend Webtatic, its awesome. Here’s how to configure the RPM, based on their official directions:
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm # rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
2) Remove existing php version and its corresponding Apache module:
# yum remove php-cli mod_php php-common
3) Install PHP 7 along with any necessary extensions. Here’s the command I used, to also grab the PDO library, mysql library, pear extension, and mcrypt library:
# yum install php70w php70w-pdo php70w-pear php70w-mysql php70w-mcrypt
And thats pretty much it! I’d recommend testing this first in a cloned environment instead of jumping right on it in production… but otherwise pretty simple to do.