wgethttp://hk2.php.net/get/php-7.1.8.tar.bz2/from/this/mirror
2、下载下来的文件为mirror镜像,通过mv命令重命名成tar.bz2文件
mvmirrorphp-7.1.8.tar.bz2
3、解压压缩文件
tarjxfphp-7.1.8.tar.bz2
4、安装php所需的依赖扩展和程序
yuminstallgdzlibzlib-developensslopenssl-devellibxml2libxml2-devellibjpeglibjpeg-devellibpnglibpng-devel
5、安装前配置,注意--enable-fpm为必须,在linux系统中php作为一个单独的进程存在
./configure--prefix=/usr/local/php7.1.8/\ --with-gd\ --enable-gd-native-ttf\ --enable-mysqlnd\ --with-mysql=mysqlnd\ --with-pdo-mysql=mysqlnd\ --with-openssl\ --enable-mbstring\ --enable-fpm
6、编译安装
make&&makeinstall