centos 7安装php环境

新安装的centos7,安装过程。

下载压缩包

cd ~/Downloads

wget http://cn2.php.net/distributions/php-5.6.12.tar.gz

安装组件

yum -y install curl-devel
yum install libxml2* -y
rpm -qa|grep libjpeg
sudo yum -y install libjpeg-devel
sudo yum -y install libpng-devel
sudo yum -y install freetype*


解压包

mkdir ~/src

tar -zxvf php-5.6.12.tar.gz  -c ~/src

cd ~/src/php-5.6.12

请修改成自己的目录 /usr/local/apache2/bin/apxs

./configure --prefix=/usr/local/php-5.6.12 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php5.6.12/etc --enable-mb --enable-bcmath --enable-mbstring --enable-sockets --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-iconv-t --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-dom --enable-xml --enable-fpm


make && make install

结束 

作者:tommycn.com(泛白の绿 小小小孔子)

参考出处:http://www.centoscn.com/image-text/config/2015/0905/6123.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值