分类: LINUX
2008-05-18 16:17:19
GD的安装
GD 2.0.33
libpng 1.2.8
zlib 1.2.3
freetype-2.1.10.tar.gz
建立安裝套件目錄
mkdir /usr/local/modules
下載完成後鍵入以下指令進行安裝。
安裝 zlib
#不要用–prefix指訂安裝目錄會影響GD
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install
安裝 freetype
tar zxvf freetype-2.1.10.tar.gz
cd freetype-2.1.10
./configure --prefix=/usr/local/modules/freetype
make
make install
安裝 libpng
#不要用–prefix指訂安裝目錄會影響GD
tar zxvf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
./configure
make
make install
安裝 jpeg-6b
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure -prefix=/usr/local/modules/jpeg6 --enable-share --enable-static
make
(make install会有错误提示),make install前先创建以下目录
mkdir /usr/local/modules/jpeg6
mkdir /usr/local/modules/jpeg6/bin
mkdir /usr/local/modules/jpeg6/include
mkdir /usr/local/modules/jpeg6/lib
mkdir /usr/local/modules/jpeg6/man
mkdir /usr/local/modules/jpeg6/man/man1
make install
安裝 GD
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/usr/local/modules/gd --with-jpeg=/usr/local/modules/jpeg6 --with-png --with-zlib --with-freetype=/usr/local/modules/freetype
make
make install
PHP重编译
#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-gd=/usr/local/modules/gd --with-zlib --with-png=/usr/local --with-jpeg-dir=/usr/local/modules/jpeg6 --with-freetype-dir=/usr/local/modules/freetype
#make
#make install