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