- 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.gzhttp: // sourceforge.net/projects/freetype/
- Php-4.3.9.tar.gz http://www.php.net
II. Installation
1. install zlib
- Tar zxvf zlib-1.2.2.tar.gz
- Cd zlib-1.2.2
- ./Configure
- Make
- Make install
2. install libpng
- Tar zxvf libpng-1.2.7.tar.tar
- Cd libpng-1.2.7
- Cd scripts/
- Mv makefile. linux ../makefile
- Cd ..
- Make
- Make install
Note that the makefile here is not generated using./configure, but copied directly from the scripts/
3. install freetype
- Tar zxvf freetype-2.1.9.tar.gz
- Cd freetype-2.1.9
- ./Configure
- Make
- Make install
4. install Jpeg
- Tar zxvf restart src.v6b.tar.gz
- Cd jpeg-6b/
- ./Configure -- enable-shared
- Make
- Make test
- Make install
Note: Here, configure must include the -- enable-shared parameter. Otherwise, the shared library will not be generated.
5. install GD
- Tar zxvf gd-2.0.33.tar.gz
- Cd gd-2.0.33
- ./Configure -- with-png -- with-freetype -- with-jpeg
- Make install
The above installation steps do not set the installation directory. you can use the above method to re-compile PHP. To specify the installation address, use the following method. we recommend that you define the installation directory. 1. install zlib
- 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
- Wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/jpeg-6b.tar.gz
- Mkdir-p/usr/local/limit 6
- Mkdir-p/usr/local/partition 6/bin
- Mkdir-p/usr/local/IPv6/lib
- Mkdir-p/usr/local/users 6/include
- Mkdir-p/usr/local/IPv6/man
- Mkdir-p/usr/local/IPv6/man1
- Mkdir-p/usr/local/users 6/man/man1
- Tar-zxf jpeg-6b.tar.gz
- Cd jpeg-6b
- ./Configure-prefix =/usr/local/configure 6-enable-shared-enable-static
- Make
- Make install
Installation completion prompt: Libraries have been installed in:/usr/local/slave 6/lib 3. install libpng
- 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
- ./Configure-prefix =/usr/local/libpng
- Make
- Make install
4. install freetype
- 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
- 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/defaults 6/-with-png =/usr/local/lib/-with-zlib = /usr/local/lib/-with-freetype =/usr/local/freetype/
- Make
- Make install
If an error occurs while installing jpg, you need to first install libtool: libtool-1.X.tar.gz // is the version I downloaded
- ./Configure
- Make
- Make install
- Then, install "src.v6b.tar.gz ".
- ./Configure -- enable-shared -- enable-static.
Otherwise, if other users require this package, they must specify its path. This may cause an error in checking host system type... Invalid configuration 'x86 _ 64-unknown-linux-gnu ': machine 'x86 _ 64-unknown' not recognized checking build system type... Invalid configuration 'x86 _ 64-unknown-linux-gnu ': machine 'x86 _ 64-unknown' not recognized configure: error: libtool configure failed or/libtool -- mode = compile gcc-O2-I. -c. /jcapimin. c make :. /libtool: make: *** [jcapimin. lo] error 127. /libtool -- mode = compile gcc-O2-I. -c. /cjpeg. c make :. /libtool: make: *** [cjpeg. lo] error 127 solution cp/usr/share/libtool/config. guess. cp/usr/share/libtool/config. sub. cp to the jpeg installation file directory, pay attention to the following ". "make clean and try again. /configure -- prefix =/usr/local/libjpeg/-- enable-shared -- enable-static make install -------------------------------- if php has been installed, we recommend that you use append compilation and installation to go to the "[php extract Directory]/ext/gd" directory and execute the following command: [php installation directory]/bin/phpize. /configure -- with-php-config = [php installation directory]/bin/php-config -- with-jpeg = [jpeg-6b installation directory] -- with-png = [libpng installation directory] -- with-freetype = [freetype installation directory] -- with-gettext = [gettext installation directory] -- with-gd = [gd installation directory] make install php installation directory]/lib/php/extensions/no-debug-non-zts-20060613 "directory to generate gd. so file, then cp [php installation directory]/lib/php/extensions/no-debug-non-zts-20060613/gd. so/opt/php/ext modify php. the INI file loads the gd component and adds extension_dir =/opt/php/ext and extension = gd. so. if extension_dir =/opt/php/ext exists, you do not need to add extension_dir =/opt/php/ext extension = gd. so |