安装缺少的库
yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y
yum install libxml2 libxml2-devel -y
yum install curl curl-devel -y
yum install libjpeg libjpeg-devel -y
PHP配置,
'./configure' \
'--prefix=/usr/local/php5.5.20' \
'--with-apxs2=/usr/local/apache24/bin/apxs' \
'--disable-cli' \
'--enable-shared' \
'--with-libxml-dir' \
'--with-gd' \
'--enable-mbstring' \
'--with-mcrypt=/usr/local/libmcrypt/' \
'--with-mysqli' \
'--with-mysql' \
'--enable-opcache' \
'--enable-mysqlnd' \
'--enable-zip' \
'--with-zlib-dir' \
'--with-pdo-mysql' \
'--with-jpeg-dir' \
'--with-freetype-dir' \
'--with-curl' \
'--without-pdo-sqlite' \
'--without-sqlite3' \
'--enable-bcmath' \
安装完毕, 设置
1. 拷贝php.ini至 /usr/local/php5.5.20/lib/
2. 建立软连接
ln -s /usr/local/php5.5.20/bin/php-cgi /usr/bin/php
2. 设置php.ini
date.timezone = Asia/Shanghai