CentOS 6.2编译安装PHP5.4.0

第一步:进入/tmp目录,下载的临时文件将会出现在这里,如果希望长期保存下来,请移动位置,否则第二天这个目录下的文件将会自动清除.
 
 
 
 
#PHP5.3.8 
wget http://cn.php.net/distributions/php-5.3.8.tar.bz2 
 
#PHP库文件
wget http://ncu.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
wget http://ncu.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
wget http://ncu.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
第二步:安装扩展库文件
#1
tar -zxvf libiconv-1.14.tar.gz && cd libiconv-1.14 /
./configure --prefix=/usr/local
make && make install && cd ../

#2
tar -zxvf libmcrypt-2.5.8.tar.gz && cd libmcrypt-2.5.8 /
./configure &&  make && make install
/sbin/ldconfig && cd libltdl 
./configure --enable-ltdl-install
make && make install && cd http://www.cnblogs.com/

#3
tar -zxvf mhash-0.9.9.9.tar.gz && cd mhash-0.9.9.9 / 
./configure && make && make install && cd ../

#4
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config

#5
tar -zxvf mcrypt-2.6.8.tar.gz && cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make && make install && cd ../

相关推荐