CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了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-u


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

大佬总结

以上是大佬教程为你收集整理的centos6.3(final) 编译安装php5.6全部内容,希望文章能够帮你解决centos6.3(final) 编译安装php5.6所遇到的程序开发问题。

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

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: