The following libraries are required to install GD:
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/
1, installation zlib-zlib-1.2.8.tar.gz
wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/zlib-1.2.3.tar.gz
TAR-ZXF zlib-1.2.3.tar.gz
CD zlib-1.2.3
./configure--prefix=/usr/local/zlib
Make
Make install
2. Install JPEG-I'm using jpegsrc.v9.tar.gz.
wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/jpeg.tar.gz
Create a JPEG installation file (below) directory before installation to prevent the prompt like "Unable to create generic file '/usr/local/jpeg/*** ': No file or directory" error
(insert hint here: I do not have this condition when I install with root account)
Mkdir/usr/local/jpeg
Mkdir/usr/local/jpeg/bin
Mkdir/usr/local/jpeg/lib
Mkdir/usr/local/jpeg/include
Mkdir/usr/local/jpeg/man
Mkdir/usr/local/jpeg/man1
Mkdir/usr/local/jpeg/man/man1
TAR-ZXF jpeg.tar.gz
CD jpeg-6b
./configure--prefix=/usr/local/jpeg--enable-shared--enable-static
Make
Make install
3, install libpng-I use the libpng-1.6.9
wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/libpng-1.2.16.tar.gz
TAR-ZXF libpng-1.2.16.tar.gz
CD libpng-1.2.16
4, install FreeType--Install this package requires Libpng library dependency, to the default location I use the freetype-2.5.1
wget http://download.savannah.nongnu.org/releases/freetype/freetype-2.3.4.tar.gz
TAR-ZXF freetype-2.3.4.tar.gz
CD freetype-2.3.4
Mkdir-p/usr/local/freetype
./configure--prefix=/usr/local/freetype
Make
Make install
5, install GD-I use the libgd-2.1.0.tar.gz
wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/gd-2.0.33.tar.gz
TAR-ZXF gd-2.0.33.tar.gz
CD gd-2.0.33
Mkdir-p/USR/LOCAL/GD2
./configure--prefix=/usr/local/gd2--with-jpeg=/usr/local/jpeg/--with-png=/usr/local/libpng/--with-zlib=/usr/ local/zlib/--with-freetype=/usr/local/freetype/
Make
Make install
Last:p HP installation GD
./configure--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql--with-zlib--with-jpeg-dir=/usr/local/jpeg-- With-png-dir=/usr/local/png--with-freetype-dir=/usr/local/freetype--enable-ftp--enable-sockets--with-gd=/usr/ LOCAL/GD2--enable-gd-native-ttf--with-ttf--enable-magic-quotes--with-iconv-enable-mbstring=all
OK all done
PS: If the installation has an error:
configure.ac:64:error:possibly undefined Macro:am_iconv
If this token and others is legitimate, please use M4_pattern_allow.
See the Autoconf documentation.
Make: * * * [Configure] Error 1
Need to install GetText here to download
./configure--prefix=/usr/local/libpng
Make
Make install
PHP Installation GD Library