Install PHP7.0 on CentOS 7 + Virtualmin (Multiple PHP Versions)

posted in: Site Related, Tips N Tricks | 0

So I finally decided to move my blog over to PHP 7.0, I’m a little slow when it comes to making changes on my server however I have been running PHP 7.0 on the work server for a while and it seems to be faster than the old PHP 5.6.

If you would like to know how it’s done then read below as it extremely easy and took me literally less than 5 mins to do…

So first off login to your terminal and go to root similar to the following:

sudo su

then simply run the following commands:

yum install scl-utils

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum install php70

yum install php70-php-mysqlnd

yum install php70-php-curl

yum install php70-php-simplexml

yum install php70-php-devel php70-php-gd php70-php-json php70-php-mcrypt php70-php-mbstring
php70-php-opcache php70-php-pear php70-php-pecl-apcu php70-php-pecl-geoip
php70-php-pecl-imagick php70-php-pecl-json-post php70-php-pecl-memcache php70-php-pecl-xmldiff
php70-php-pecl-zip php70-php-pspell php70-php-soap php70-php-tidy php70-php-xml php70-php-xmlrpc

You can then find it installed here:

/etc/opt/remi/php70/php.d

You can then add it Virtualmin by doing the following:

System Settings -> Re-Check Config

If you want to make it standard then it’s here:

System Settings -> Server Templates -> Default -> Apache Website -> Default PHP version

Sources:Virtualmin Documentation & Virtualmin Forums

Leave a Reply