(2)安装php相关软件包《gd,libxml2,openssl,libmcrypt》:
① [root@localhost ~]#cd gd-2.0.34
[root@localhost gd-2.0.34]# ./configure --prefix=/usr/local/gd2
[root@localhost gd-2.0.34]#make
[root@localhost gd-2.0.34]#make install
[root@localhost gd-2.0.34]#cd ..
② [root@localhost ~]#cd libxml2-2.6.30
[root@localhost libxml2-2.6.30]#./configure --prefix=/usr/local/libxml2
[root@localhost libxml2-2.6.30]#.make
[root@localhost libxml2-2.6.30]#.make install
[root@localhost libxml2-2.6.30]#.cd ..
③ [root@localhost ~]#cd openssl-0.9.8e
[root@localhost openssl-0.9.8e]#./config --prefix=/usr/local/openssl
[root@localhost openssl-0.9.8e]#make
[root@localhost openssl-0.9.8e]#make install
[root@localhost openssl-0.9.8e]#cd ..
④ [root@localhost ~]#cd libmcrypt-2.5.8
[root@localhost libmcrypt-2.5.8]#./configure --prefix=/usr/local/libmcrypt
[root@localhost libmcrypt-2.5.8]#make
[root@localhost libmcrypt-2.5.8]#make install
[root@localhost libmcrypt-2.5.8]#cd ..
(3)安装php软件包:
[root@localhost ~]#cd php-5.2.4
[root@localhost php-5.2.4]#./configure "--prefix=/usr/local/php" "--with-apxs2=/usr/local/apache2/bin/apxs" "--with-config-file-path=/usr/local/php/etc" "--with-mysql=/usr/local/mysql" "--with-libxml-dir=/usr/local/libxml2" "--with-gd=/usr/local/gd2" "--with-jpeg-dir" "--with-png-dir" "--with-bz2" "--with-freetype-dir" "--with-iconv-dir" "--with-zlib-dir " "--with-openssl=/usr/local/openssl" "--with-mcrypt=/usr/local/libmcrypt" "--enable-soap" "--enable-gd-native-ttf" "--enable-ftp" "--enable-mbstring" "--enable-exif" "--disable-ipv6" "--disable-cgi" "--disable-cli"
[root@localhost php-5.2.4]#make php测试页info.php:内容如下 <?php
[root@localhost php-5.2.4]#make install phpinfo();
[root@localhost php-5.2.4]#cd .. ?>
