linux下php的gd拓展编译安装
cd /home
wget http://download.sourceforge.net/libpng/libpng-1.6.21.tar.gz
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.6.tar.gz
wget http://www.ijg.org/files/jpegsrc.v9b.tar.gz
tar -zxvf freetype-2.6.tar.gz
tar -zxvf jpegsrc.v9b.tar.gz
tar -zxvf libpng-1.6.21.tar.gz
cd /home/freetype-2.6
./configure
--prefix=/usr/local/freetype
make && make install
cd /home/jpeg-9b
CFLAGS="-O3 -fPIC" ./configure
--prefix=/usr/local/jpeg
make && make install
mkdir -p /usr/local/jpeg/include
mkdir -p /usr/local/jpeg/lib
mkdir -p /usr/local/jpeg/bin
mkdir -p /usr/local/jpeg/man/man1
cd /home/libpng-1.6.21
CFLAGS="-O3 -fPIC" ./configure
--prefix=/usr/local/libpng
make && make install
cd /home/lamplist/php-5.6.20/ext/gd
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
--with-jpeg-dir=/usr/local/jpeg
--with-png-dir=/usr/local/libpng
--with-freetype-dir=/usr/local/freetype
make && make install