Linux Source Installation php7.2.0

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.