centos php5.6编译安装,centos6.3(final) 编译安装php5.6

搜索热词

wget http://cn2.PHP.net/distributions/PHP-5.6.2.tar.gz

tar -zxvf PHP-5.6.2.tar.gz

cd PHP-5.6.2

./configure --prefix=/usr/local/PHP --with-config-file-path=/usr/local/PHP/etc --enable-fpm --with-fpm-user=PHP-fpm --with-fpm-group=PHP-fpm --with-MysqL=MysqLnd --with-MysqL-sock=/tmp/MysqL.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 --with-pear --with-curl --with-openssl

make

make install

echo "export PATH=$PATH:/usr/local/PHP/bin" >>/etc/profile

source /etc/profile

cp /usr/local/PHP/etc/PHP-fpm.conf.default PHP-fpm.conf

修改PHP的配制文件PHP-fpm.conf (在安装目录的etc子目录下)

cp ./PHP-5.6.2/sapi/fpm/init.d.PHP-fpm /etc/init.d/PHP-fpm

将@PHP_fpm_user@改为当前系统的用户名

user = user

group = user

设置权限,并添加服务

chmod +x /etc/init.d/PHP-fpm chkconfig --add PHP-fpm

以后可以使用如下命令管理PHP-fpm了

service PHP-fpm start service PHP-fpm stop service PHP-fpm restart service PHP-fpm reload

总结

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值