PHP Compilation Installation

Source: Internet
Author: User

1, get the source code
Wget-o php.tar.gz Http://am1.php.net/get/php-5.6.27.tar.gz/from/this/mirror

Tar zxvf php.tar.gz

CD php-5.6.27
2, create users and groups

Groupadd PHP
Useradd php-g PHP

3, installation dependent

Yum install libxml2-devel libcurl-devel libjpeg-turbo-devel libpng-devel freetype-devel

4, compiling and installing


./configure--prefix=/usr/local/php--enable-opcache--enable-fpm--enable-sockets--enable-mysqlnd-- Enable-gd-native-ttf--with-fpm-user=php--with-fpm-group=php--with-pdo-mysql--with-gd--with-jpeg-dir=/usr/lib/- With-freetype-dir=/usr/lib--with-curl

Make && make install

5, self-priming script

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

6, configuration
Phpconf.zip
Copy to/usr/local/php/lib/php.ini
Copy to/usr/local/php/etc/php-fpm.conf

Http://files.cnblogs.com/files/mysic/phpconf.zip

PHP Compilation Installation

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.