一、下载gd-2.0.33.tar.gz http://www.boutell.com/gd/jpegsrc.v6b.tar.gz http://www.ijg.org/libpng-1.2.7.tar.tar http://sourceforge.net/projects/libpng/zlib-1.2.2.tar.gz http://sourceforge.net/projects/zlib/freetype-2.1.9.tar.gz http://sourceforge.net/projects/freetype/php-4.3.9.tar.gz http://www.php.net二、说明最新的GD库包括了对GIF的支持,所以不要打GIF补丁http://sourceforge.net/ 好多源代码包可以在上面找到安装步骤:先安装zlib,freetype,libpng,jpeg,再装GD,再装PHP三、安装1.装zlib tar zxvf zlib-1.2.2.tar.gz
cd zlib-1.2.2
./configure
make
make install2.安装libpng tar zxvf libpng-1.2.7.tar.tar
cd libpng-1.2.7
cd scripts/
mv makefile.linux ../makefile
cd ..
make
make install
注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个3.安装freetype tar zxvf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install4.安装Jpeg tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure --enable-shared
make
make test
make install
注意,这里configure一定要带--enable-shared参数,不然,不会生成共享库5.安装GD tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --with-png --with-freetype --with-jpeg
make install6.安装PHP tar zxvf php-4.3.9.tar.gz
cd php-4.3.9
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --with-zlib --with-png --with-jpeg --with-freetype --enable-sockets
make
make install7.配置Apache支持PHP8.测试phpinfo();
?>Ok.....
cd zlib-1.2.2
./configure
make
make install2.安装libpng tar zxvf libpng-1.2.7.tar.tar
cd libpng-1.2.7
cd scripts/
mv makefile.linux ../makefile
cd ..
make
make install
注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个3.安装freetype tar zxvf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install4.安装Jpeg tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure --enable-shared
make
make test
make install
注意,这里configure一定要带--enable-shared参数,不然,不会生成共享库5.安装GD tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --with-png --with-freetype --with-jpeg
make install6.安装PHP tar zxvf php-4.3.9.tar.gz
cd php-4.3.9
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --with-zlib --with-png --with-jpeg --with-freetype --enable-sockets
make
make install7.配置Apache支持PHP8.测试phpinfo();
?>Ok.....
rpm -i *jpeg*.rpm
rpm -i *gif*.rpm
rpm -i *png*.rpm
然后编译php就可以通过了。呵呵。很简单。
##### JPEG的安装
cd /usr/src
tar xzvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure
make
make install
cp jpeglib.h /usr/include/
cp *.h /usr/include
cp libjpeg.a /usr/local/lib/
cp libjpeg.so /usr/local/lib/## gettext 的安装
cd /usr/src
tar -xzvf gettext-0.10.35.tar.gz
cd gettext-0.10.35
./configure
make
make install
##### ttf 的安装和配置
cd /usr/src
tar -xzvf freetype-1.3.1.tar.gz
cd freetype-1.3.1
./configure
##fink remove freetype freetype-hinting
make
make install
##### 编译gd 的时候有error don't found the freetype.h 所以
cp /usr/local/include/freetype/* /usr/local/include/##### zlib 安装:
cd /usr/src
tar -xzvf zlib-1.2.1.tar.gz
cd zlib-1.2.1
./configure
make
make install##### libpng 安装:
cd /usr/src
tar -xzvf libpng-1.2.4.tar.gz
cd libpng-1.2.4
cp script/makefile.linux Makefile
./configure
make
make install##### GD 2.0.21的安装和配置
cd /usr/src
tar xzvf gd-2.0.21.tar.gz
cd gd-2.0.21gif
./configure
make
make install##### apache第一次编译,并不要安装
cd /usr/src
tar xzvf apache_1.3.x.tar.gz
cd apache_1.3.x
./configure --prefix=/usr/local/apache##### 编译安装PHP
cd /usr/src
tar xzvf php-4.3.x.tar.gz
cd php-4.3.x
./configure --with-apache=../apache_1.3.y --with-config-file-path=/etc --enable-versioning --with-regex=system --enable-mbstring=all --enable-track-vars --with-xml --enable-calendar --with-freetype-dir=/usr/local --enable-url-includes --enable-sockets --with-gd=/usr/local --enable-gd-native-ttf --with-ttf=/usr/local --with-jpeg-dir=/usr/local --with-zlib-dir=/usr/local --with-png-dir=/usr/local --enable-zend-multibyte --disable-inline-optimization --with-freeimage
make
make install##### apache_1.3.x的安装和配置
cd /usr/src/apache_1.3.x
./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a --enable-module=so --enable-module= --enable-module=actions --enable-module=userdir --enable-module=alias --enable-module=setenvif
make
make install##### 安装Zend
cd /usr/src
tar -xzvf ZendOptimizer-2.5.2-Linux_glibc21-i386.tar.gz
cd ZendOptimizer-2.5.2-Linux_glibc21-i386.tar.gz
sh install.sh
如果我能给你分,真希望把分都给你