標籤:ar sp strong on bs ef linux tt nbsp
1.安裝zlib
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/usr/local/zlib
make
make install
2.安裝libpng
tar zxvf libpng-1.2.8.tar.tar
cd libpng-1.2.8
mv ./scripts/makefile.linux ./makefile
make
make install
注意,這裡的makefile不是用./configure產生,而是直接從scripts/裡拷一個
3.安裝freetype
tar zxvf freetype-2.1.10.tar.gz
cd freetype-2.1.10
./configure --prefix=/usr/local/freetype
make
make install
4.安裝Jpeg
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure --prefix=/usr/local/jpeg6 --enable-shared --enable-static
make
make install
注意,這裡configure一定要帶--enable-shared參數,不然,不會產生共用庫
5.安裝GD
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --with-png --with-jpeg --with-freetype=/usr/local/freetype
make
make install
6.重新編譯PHP
tar zxvf php-4.3.9.tar.gz
cd php-4.3.9
./configure (以前的參數) --with-gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png --with-jpeg --with-freetype-dir=/usr/local/freetype
make
make install
給php增加gd庫(轉)