#part2
yum -y install pcre pcre-devel openssl openssl-devel


#part 3
yum -y install libxml2 libxml2-devel
yum -y install libpng libpng-devel
yum -y install libmcrypt libmcrypt-devel
yum -y install libjpeg libjpeg-devel
yum -y install freetype freetype-devel


cd /data
tar -xzvf php-5.6.27.tar.gz 
cd php-5.6.27
./configure --prefix=/data/php --with-config-file-path=/data/php/ --enable-fpm --with-mysql --with-mysqli --enable-mbstring --with-gd --with-zlib-dir --enable-zip --enable-soap --with-jpeg-dir --with-png-dir --enable-gd-native-ttf --with-freetype-dir --enable-exif
make
make install


#part 4
cd /data
yum -y install unzip
unzip phpredis-develop.zip
cd phpredis-develop
/data/php/bin/phpize
./configure --with-php-config=/data/php/bin/php-config
make
make install


cd /data/php-5.6.27/ext/mcrypt/
/data/php/bin/phpize
./configure --with-php-config=/data/php/bin/php-config
Èç¹û±¨´í£ºconfigure: error: mcrypt.h not found. Please reinstall libmcrypt£º
Ö´ÐÐ£º yum install -y epel-release     yum install -y libmcrypt-devel

make
make install


cd /data/php-5.6.27/ext/openssl/
mv config0.m4 config.m4
/data/php/bin/phpize
./configure --with-openssl --with-php-config=/data/php/bin/php-config
make
make install


cd /data
tar -zxvf curl-7.35.0.tar.gz
cd  curl-7.35.0
./configure --prefix=/usr/local/curl
make
make install


cd /data/php-5.6.27/ext/curl/
/data/php/bin/phpize
./configure --with-curl=/usr/local/curl --with-php-config=/data/php/bin/php-config
make
make install


cd /data/php-5.6.27/ext/bcmath/
/data/php/bin/phpize
./configure --with-php-config=/data/php/bin/php-config
make
make install


=================================================================

cp /data/php.ini /data/php/php.ini
cp /data/php-fpm.conf /data/php/etc/php-fpm.conf

=================================================================

systemctl disable php-fpm
systemctl stop php-fpm

/data/php/sbin/php-fpm

=================================================================

ps -ef | grep php
kill -USR2 XXX




