新安装的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