码迷,mamicode.com
首页 > Web开发 > 详细

CentOS下PHP的编译安装

时间:2016-07-11 10:26:16      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

 

#获取安装包
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

#编译
./configure --prefix=/usr/local/php --with-mysql --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-xmlrpc --with-xsl --with-zlib --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --enable-zip


#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

CentOS下PHP的编译安装

标签:

原文地址:http://www.cnblogs.com/wwwx/p/5659311.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!