first you need to install EPEL https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
on CentOS 7 you can install it with:

yum install epel-release

after we need to install REMI repository.

rpm -Uhv https://rpms.famillecollet.com/enterprise/remi-release-7.rpm

then we need to define the minimum list of packages:

PHP_PACKAGES=(cli common fpm opcache gd curl mbstring bcmath soap mcrypt mysqlnd pdo xml xmlrpc intl) 
PHP_PECL_PACKAGES=(pecl-redis pecl-lzf pecl-geoip pecl-zip pecl-memcache)

and finally we install all these packages at once:

yum --enablerepo=remi,remi-php70 install php ${PHP_PACKAGES[@]/#/php-} ${PHP_PECL_PACKAGES[@]/#/php-}

and now we have installed php7.

complete server installation and configuration from scratch:
https://github.com/magenx/Magento-Automated-Server-Configuration-from-MagenX/tree/master/Magento-2