CentOS下PHP的编译安装
#获取安装包
wget http://cn2.php.net/distributions/php-5.6.23.tar.gz
tar -zxvf php-506.23.tar.gz
cd php-5.6.23
#依赖程序
yum install gcc
yum install libxml2
yum install libxml2-devel -y
yum install openssl openssl-devel
yum install libpng
yum install libpng-devel
yum install freetype
yum install freetype-devel
yum install libxslt-devel
yum -y install libjpeg-devel
#编译
./configure --prefix=/usr/local/php --with-curl --with-freetype-dir --with-gd
--with-gettext --with-iconv-dir --with-kerberos --with-openssl --with-libdir=lib64
--with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-mysql
--with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc
--with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath
--enable-libxml --enable-inline-optimization --enable-mbregex --enable-mbstring
--enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets
--enable-sysvsem --enable-sysvshm --enable-xml --enable-zip --enable-fpm --enable-gd-native-ttf
#yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel mysql pcre-devel openssl openssl-devel
#yum -y install curl-devel
#yum -y install libxslt-devel
make
make test
make install
make clean
cp php.ini-development /usr/local/php/etc/php.ini
vi /usr/local/php/etc/php.ini
date.timezone = ‘Asia/Shanghai’
mv php-fpm.conf.default php-fpm.conf
/usr/local/php/sbin/php-fpm
#php配置文件路径
/usr/local/php/lib/php.ini
查看进程号
ps -aux | grep php-fpm
php-fpm重启
killall php-fpm
/usr/local/php/sbin/php-fpm