Centos 6, running PHP7 alongside stock PHP5

I have a couple of servers running PHP 5.x.x on CentOS 6 and i want to migrate some to PHP7, without worrying about the older stuff. So, i could compile PHP7 from source, setup FPM and Opcache for it, etc, etc, but i found out that REMI as a solution for this side-by-side scenario.

First, http://rpms.remirepo.net/enterprise/remi-safe.repo into the /etc/yum.repos.d

Next, yum install php71-php (add any other dependencies you require via yum also).

Finally, php is running in command line. The binaries are called “php71*” instead of “php*”, but aside from this, everything works well.
#> php71 -v
PHP 7.1.8 (cli) (built: Aug 2 2017 14:40:28) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.8, Copyright (c) 1999-2017, by Zend Technologies


Posted

in

by

Tags:

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from try {} except

Subscribe now to keep reading and get access to the full archive.

Continue reading