微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

CentOS 6.5 php源码安装1.0版

groupadd www

useradd -g www -s /sbin/nologin -M www


yum install -y freetype-devel libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg libjpeg-devel libpng libpng-devel

./configure --prefix=/usr/local/PHP --with-config-file-path=/usr/local/PHP/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-MysqL=MysqLnd --with-MysqLi=MysqLnd --with-pdo-MysqL=MysqLnd --enable-opcache --enable-sockets --enable-xml --enable-mbstring --enable-soap --enable-zip --enable-bcmath --with-gettext --with-openssl --with-zlib --with-curl --with-gd --with-freetype-dir=/usr/include/freetype2/ --with-zlib-dir=/usr/lib --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-mhash --with-apxs2=/usr/local/apache/bin/apxs

make

make install


cp PHP.ini-development /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

service PHP-fpm start

service PHP-fpm restart


vim ~/.bash_profile

PATH=$PATH:$HOME/bin:/usr/local/PHP/bin

~/.bash_profile

PHP -v

原文地址:https://www.jb51.cc/centos/379579.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。