1. 源码包下载地址
官网链接: https://www.php.net/distributions/php-7.2.0.tar.gz
百度云: https://pan.baidu.com/s/1zhac_y82wABSgp2QdwCXqA 密码: di42
tar –zxvf php-7.2.0.tar.gz
cd php7.2.0
yum install libxml2 libxml2-devel openssl openssl-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libmcrypt libmcrypt-devel -y
./configure --prefix=/usr/local/php720 --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-simplexml --enable-xml --disable-rpath --enable-bcmath --enable-soap --enable-zip --with-curl --enable-fpm --with-fpm-user=nobody --with-fpm-group=nobody --enable-mbstring --enable-sockets --with-gd --with-openssl --with-mhash --enable-opcache --disable-fileinfo
make && make install
8. 配置nginx.conf支持解析PHP
打开nginx配置文件(/usr/local/nginx/conf/nginx.co