2 Installing PHP+PHP-FPM

Source: Internet
Author: User

Configurationphp-fpm

PHP official website:http://www.php.net/

PHP-FPM # to start The PHP-FPM service, there are ports, port number 9000

Lamp php does not start, its tool is APXS, and lnmp in the php-fpm tool is ENABLE-FPM

PNP-FPM and nginx run a service alone

steps:

cd/usr/local/src/

Wgethttp://cn2.php.net/distributions/php-5.6.19.tar.gz

Tar zxvf php-5.6.19.tar.gz

CD php-5.6.19

# because the compile time needs a lot of related packages, are with in, so first download good

Yum install-y gcc

Yum Install-y libxml2-devel

Yum Install-y curl-devel

Yum Install-y libjpeg-devel

Yum install-y libpng Libpng-devel

Yum install-y FreeType Freetype-devel

# Below is a summary

Yum install-y libxml2-devel curl-devellibjpeg-devel libpng libpng-devel freetype freetype-devel

wget http://www.lishiming.net/data/attachment/forum/epel-release-6-8_32.noarch.rpm

RPM-IVH epel-release-6-8_32.noarch.rpm

Yum Install-y libmcrypt-devel

./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--enable-fpm--with-fpm-user=  PHP-FPM--with-fpm-group=php-fpm--with-mysql=/usr/local/mysql--with-mysql-sock=/tmp/mysql.sock--with-libxml-dir --WITH-GD--with-jpeg-dir--with-png-dir--with-freetype-dir--with-iconv-dir--with-zlib-dir--with-mcrypt- -enable-soap--enable-gd-native-ttf--enable-ftp--enable-mbstring--enable-exif--disable-ipv6--with-curl

Make && make install #make for a long time

Useradd-s/sbin/nologin PHP-FPM # compiling the specified users and groups

CP Php.ini-production/usr/local/php/etc/php.ini # copy php.ini configuration file

mv/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf #php-fpm configuration file, startup script variables

CP SAPI/FPM/INIT.D.PHP-FPM/ETC/INIT.D/PHP-FPM

chmod 755/etc/init.d/php-fpm

Chkconfig--add PHP-FPM

Chkconfig PHP-FPM on

/ETC/INIT.D/PHP-FPM start


This article is from the "11736718" blog, please be sure to keep this source http://11746718.blog.51cto.com/11736718/1876247

2 Installing PHP+PHP-FPM

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.