centos6.6 Compile Installation php7.1

Source: Internet
Author: User

Requirements Installation Plugin
Pgsql, Pdo_pgsql, Redis, Memcache, Yaml, Imagick. Installation location/usr/local/php upload file size: 512M post max: 512M code directory/data/www/htdocs software cache/data/www/cache

Can wait for configure error problem reload can also start to install dependent library.

Yum-y Install libxml2-devel
yum-y install curl-devel yum install-y
ICU libicu libicu-devel  Yum Install -y glibc-headers gcc-c++
yum install libxslt-devel*-y

Configuration detection

./configure--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
- WITH-CONFIG-FILE-SCAN-DIR=/USR/LOCAL/PHP/ETC/PHP.D \--enable-fpm--with-fpm-user=root \
--disable-fileinfo-- With-freetype-dir--with-jpeg-dir--with-png-dir \
--with-zlib--with-pgsql=/usr/local/pgsql--with-pdo-pgsql=/ Usr/local/pgsql \
--with-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib \
--with-libxml-dir=/usr-- Enable-xml--disable-rpath--enable-bcmath \
--enable-shmop--enable-exif--enable-sysvsem-- enable-inline-optimization \
--with-curl--enable-intl-with-xsl--with-gettext \
--enable-zip--enable-soap --disable-debug

Compiling the installation

Make make 
Install

Copy php.ini from the source folder to the installation directory in PHP.
Follow the official web site to modify PHP-FPM and Nginx profiles to set up running users and groups.
Start PHP-FPM
Modify the Openresty configuration file to support PHP-FPM.

Add System V script.

Cp-r ~/PHP-7.0.15/SAPI/FPM/INIT.D.PHP-FPM/ETC/INIT.D/PHP-FPM

Modify Content/ETC/INIT.D/PHP-FPM Content
`
prefix=/usr/local/php/
Exec_prefix=/usr/local/php/bin

php_fpm_bin=/usr/local/php/bin/php-fpm
Php_fpm_conf=/usr/local/php/etc/php-fpm.conf
Php_fpm_pid=/var/run/php-fpm.pid
`
Execute command

Chkconfig-add php-fpm
chkconfig php-fpm on

Configure Environment variables
vim/etc/profile.d/php-fpm

Export Path=/usr/local/php/bin: $PATH

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.