您的位置:首页 > 编程语言 > PHP开发

php5.6.21编译安装

2016-06-22 16:49 555 查看
centos 7.0 64位 php5.6.21编译安装
!/bin/bash

#install_php-5.6.21.tar.gz

cp -frp /usr/lib64/libldap* /usr/lib/
//源码包放在/usr/local/mysql
cd /usr/local/src
tar xzvf php-5.6.21.tar.gz
cd php-5.6.21
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-gd --enable-gd-native-ttf --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --without-pear
sed -i 's/^EXTRA_LIBS =.*/& -llber/' $SOURCE_DIR/php-5.6.21/Makefile
make
make install

cp php.ini-production /usr/local/php/etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default  /usr/local/php/etc/php-fpm.conf
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm

chkconfig --add php-fpm
chkconfig php-fpm on

编译安装完成后启动php-fpm
/etc/init.d/php-fpm start
//查看php-fpm启动是否成功
ps aux | grep php-fpm
nestat -tnlp | grep 127.0.0.1:9000


本文出自 “ubuntu” 博客,请务必保留此出处http://thankinglove.blog.51cto.com/2311485/1791798
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: