9. tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install clean
2:安装 PNG
##########libpng###########
tar zxvf libpng-1.2.26.tar.gz
cd libpng-1.2.26
cp scripts/makefile.linux ./makefile
./configure --prefix=/usr/local/libpng
make
make install clean
3:安装 freetype
##########freetype#########
cd freetype-2.3.5
./configure
make
make install
4:安装 JPEG6
#########jpeg###############
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
mkdir -pv /usr/local/jpeg/{,bin,lib,include,man/man1,man1}
./configure --prefix=/usr/local/jpeg --enable-shared --enable- static
make
make install
5:安装 GD
########GD###########
10. tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --with-png --with-freetype --with-jpeg=/usr/local/jpeg/
make
make install
5.4 安装 php
1:安装 LIBXML2
#####libxml2 #####
tar zxvf libxml2-2.6.31.tar.gz
cd libxml2-2.6.31
./configure --prefix=/usr/local/libxml2
make
make install
cp xml2-config /usr/bin
2::安装 PHP5.2.5
#########php##########
tar zxvf php-5.2.5.tar.gz
cd php-5.2.5
./configure --prefix=/usr/local/php5 --with-mysql=/usr/local/mysql5 --with-
apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir=/usr/local/jpeg --with-freetype-
dir=/usr/local/include/freetype2 --with-zlib --with-png-dir=usr/local/libpng12
--with-libxml-dir=/usr/local/libxml2 --with-gd --enable-ftp --enable-sockets
make
make test
make install
3:配置
cp php.ini-dict /usr/local/php5/lib/php.ini
编辑 httpd.conf
/usr/local/apache2/conf/httpd.conf
加载 php 模块,去掉注释,我的版本是缺省就启用的。
LoadModule php5_module modules/libphp5.so
加上下面两行