HostOnNet Blog

Install PHP 7.0 on CentOS 7 Server

To install PHP 7 on CentOS 7 server, install epel and remi repository.

rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm

Install PHP 7 from remi repository.

yum --enablerepo=remi update remi-release
yum --enablerepo=remi-php70 install php70-php php70-php-pear php70-php-bcmath php70-php-pecl-jsond-devel php70-php-mysqlnd php70-php-gd php70-php-common php70-php-fpm php70-php-intl php70-php-cli php70-php php70-php-xml php70-php-opcache php70-php-pecl-apcu php70-php-pecl-jsond php70-php-pdo php70-php-gmp php70-php-process php70-php-pecl-imagick php70-php-devel php70-php-mbstring

Enable remi-php70

yum install yum-utils
yum-config-manager --enable remi-php70

Restart apache

service httpd restart

Edit php.ini to your requirement

vi /etc/opt/remi/php70/php.ini

Posted in CentOS