1. Source Code Package
HTTPS://pan.baidu.com/s/1bpi4d9l
2. Unzip the PHP archive package
TAR–ZXVF php-7.2.0.tar.gz
3. Enter the extracted
CD php7.2.0
4. Install the required extensions for PHP
Yum install libxml2 libxml2-devel OpenSSL openssl-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel fr Eetype Freetype-devel Libmcrypt libmcrypt-devel-y
6. Start the configuration
./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
7. Compiling the installation
Make && make install
8. Configuration nginx.conf Support parsing PHP open nginx configuration file (/usr/local/nginx/conf/ nginx.conf) Find the Localtion module, add index.php after index, make Nginx recognize PHP file, continue to slide, and then modify: Start Php-fpm:1. Copy Php-fpm.conf.default to php-fpm.conf
cd/usr/local/php720/etc cp php-fpm.conf. Default
2. Then start PHP-FPM
/usr/local/php720/sbin/php-fpm
If you start an error (such as): Workaround: Go to/USR/LOCAL/PHP720/ETC/PHP-FMP.D under the Www.conf.default copy to Www.conf, and then start php-fpm; Enter the folder (if you can't get in, A step-by-step CD in; If you do not have this file you create a PHP-FPM.D folder, and then go to the URL to download www.conf file: Https://pan.baidu.com/s/1o8mRYkU)
CD/USR/LOCAL/PHP720/ETC/PHP-FPM. d cp www. conf.Default
Clear the PHP-FPM process first
Pkill PHP-FPM
Start PHP-FPM again.
/usr/local/php720/sbin/php-fpm
Finally new file index.php under/usr/local/nginx/html, output phpinfo; Display success, indicating that PHP installation is successful
Linux Source Installation php7.2.0