一、安装PHP所需的lib库(基础库):
1、yum install zlib-devel libxml2-devel libjpey-devel libjpeg-turbo-devel libiconv-devel -y
2、yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel libxslt-devel -y
3、安装yum源无法安装的libiconv库
mkdir -p /home/oldboy/tools/
cd /home/oldboy/tools/
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make
make install
cd ../
二、PHP相关扩展库安装
1、wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
2、yum -y install libmcrypt-devel
3、yum -y install mhash
4、yum -y install mcrypt #加密扩展库...
5、rpm -qa libmcrypt-devel mhash mcrypt