1.8LNMP Environment Compilation Installation php-5.6.14

Source: Internet
Author: User
Tags pear zend

First, unzip PHP

[Email protected] src]# tar jxf php-5.6.14.tar.bz2

[Email protected] src]# CD php-5.6.14

Second, create PHP-related users

[Email protected] php-5.6.14]# useradd-s/sbin/nologin php-fpm

Third, compile and install PHP

[Email protected] php-5.6.14]#/configure \

>--prefix=/usr/local/php \





>--with-mysql=/usr/local/mysql \

>--with-mysql-sock=/var/lib/mysql/mysql.sock \

>--with-mysqli=/usr/local/mysql/bin/mysql_config \

>--with-freetype-dir=/usr/local/freetype \

>--with-jpeg-dir=/usr/local/jpeg6 \

>--with-mcrypt=/usr/local/libmcrypt \


>--with-iconv-dir=/usr/local/libiconv \

>--with-png-dir \

>--with-zlib \

>--with-libxml-dir \

>--with-curl \

>--with-mhash \

>--with-openssl \

>--with-pear \

>--enable-soap \

>--enable-gd-native-ttf \

>--enable-ftp \

>--enable-mbstring \

>--enable-exif \

>--enable-zend-multibyte \

>--disable-ipv6 \

>--enable-bcmath \


>--enable-sysvsem \


Configure:WARNING:unrecognized options:--enable-zend-multibyte (unsupported parameter)

[[email protected] php-5.6.14]# make && make install

[Email protected] php-5.6.14]# ls/usr/local/php/

Bin etc include Lib Php sbin var

1. Copy PHP master configuration file

[email protected] php-5.6.14]# CP Php.ini-production/usr/local/php/etc/php.ini

2. Copy startup script

[email protected] php-5.6.14]# CP SAPI/FPM/INIT.D.PHP-FPM/ETC/INIT.D/PHP-FPM

[Email protected] php-5.6.14]# chmod 755/etc/init.d/php-fpm

[Email protected] php-5.6.14]# chkconfig--add php-fpm

[Email protected] php-5.6.14]# chkconfig php-fpm on

3. Copy PHP-FPM configuration file

[Email protected] php-5.6.14]# mv/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf

[Email protected] php-5.6.14]# ls/usr/local/php/etc/

pear.conf php-fpm.conf php.ini

4. Check Configuration errors

[Email protected] php-5.6.14]#/usr/local/php/sbin/php-fpm-t

[16-dec-2015 14:16:26] Notice:configuration file/usr/local/php/etc/php-fpm.conf Test is successful

5. Start PHP-FPM

[[Email protected] php-5.6.14]# service PHP-FPM start

Starting php-fpm Done

6. Review the process

[[Email protected] php-5.6.14]# PS aux | grep php-fpm

Root 16922 0.0 0.4 129188 4988? Ss 14:17 0:00 php-fpm:master process (/usr/local/php/etc/php-fpm.conf)

PHP-FPM   16923  0.0  0.4 129188  4636?        s    14:17   0:0 0 Php-fpm:pool www                             &NBS P                          ,         &NB Sp                          ,         &NB Sp      

PHP-FPM 16924 0.0 0.4 129188 4636? S 14:17 0:00 Php-fpm:pool www

Root 16927 0.0 0.0 103248 876 pts/0 s+ 14:18 0:00 grep php-fpm

7. Viewing the Listening port

[Email protected] php-5.6.14]# NETSTAT-NLTP | grep php-fpm

TCP 0 0* LISTEN 16922/php-fpm

1.8LNMP Environment Compilation Installation php-5.6.14

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.