(1) 安裝freetypephp
tar jxvf freetype-2.3.10.tar.bz2 cd freetype-2.3.10 ./configure –prefix=/usr/local/freetype make make install cd ..
(2) 安裝jpegmysql
tar zxvf jpegsrc.v7.tar.gz cd jpeg-7 ./configure -prefix=/usr/local/jpeg make make install cd ..
(3) 安裝libpngsql
tar jxvf libpng-1.2.41.tar.bz2 cd libpng-1.2.41 ./configure -prefix=/usr/local/libpng make make install
(4) 安裝GDshell
① 連接頭文件apache
ls -s /usr/local/libpng/include/pngconf.h /usr/include ls -s /usr/local/libpng/include/png.h /usr/include
② 安裝GDcurl
tar zxvf gd-2.0.35.tar.gz cd gd-2.0.35 ./configure -prefix=/usr/local/gd2 \ --with-freetype=/usr/local/freetype -with-png=/usr/local/libpng \ --with-jpeg=/usr/local/jpeg make make install cd ..
(5) 安裝PHPurl
tar jxvf php-5.2.17.tar.bz2 cd php-5.2.17 ./configure -prefix=/usr/local/php \ --with-gd=/usr/local/gd2 --with-apxs2=/usr/local/apache/bin/apxs \ --enable-mbregex --enable-bcmath \ --with-mysql --with-zlib-dir --enable-mbstring=all \ --with-pdo-mysql --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/jpeg \ --with-openssl \ --with-curl make make install cp php.ini-dist /usr/local/php/lib/php.ini cd ..