1.首先下载php7
wget -O php7.tar.gz http://cn2.php.net/get/php-7.0.4.tar.gz/from/this/mirror
2.解压php7
tar -xvf php7.tar.gz
3.进入php目录
cd php-7.0.4
4.安装依赖包
yum install libxml2 libxml2-devel openssl openssl-develbzip2bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel
5.安装
make
make install
看一下是否安装成功
php -v
完美!