- 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
Copy CodeSecond, installation 1. Installing zlib
- Tar zxvf zlib-1.2.2.tar.gz
- CD zlib-1.2.2
- ./configure
- Make
- Make install
Copy Code2. Installing libpng
- Tar zxvf Libpng-1.2.7.tar.tar
- CD libpng-1.2.7
- CD scripts/
- MV Makefile.linux. /makefile
- Cd..
- Make
- Make install
Copy CodeNote that the makefile here is not built with./configure, but instead directly from the scripts/. 3. Installing FreeType
- Tar zxvf freetype-2.1.9.tar.gz
- CD freetype-2.1.9
- ./configure
- Make
- Make install
Copy Code4. Install JPEG
- Tar zxvf jpegsrc.v6b.tar.gz
- CD jpeg-6b/
- ./configure--enable-shared
- Make
- Make Test
- Make install
Copy CodeNote that this configure must take 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
Copy CodeThe above installation steps are not set the installation directory, test recompile PHP with the above method can be. To specify the installation address, it is recommended that you define the installation directory as follows. 1, installation 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
Copy Code2. Install JPEG
- wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/jpeg-6b.tar.gz
- Mkdir-p/usr/local/jpeg6
- Mkdir-p/usr/local/jpeg6/bin
- Mkdir-p/usr/local/jpeg6/lib
- Mkdir-p/usr/local/jpeg6/include
- Mkdir-p/usr/local/jpeg6/man
- Mkdir-p/usr/local/jpeg6/man1
- Mkdir-p/usr/local/jpeg6/man/man1
- TAR-ZXF jpeg-6b.tar.gz
- CD jpeg-6b
- ./configure–prefix=/usr/local/jpeg6–enable-shared–enable-static
- Make
- Make install
Copy CodeInstallation complete prompt: Libraries has been installed in:/usr/local/jpeg6/lib 3, installation 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
Copy Code4, Installation 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
Copy Code5. Installing 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/jpeg6/–with-png=/usr/local/lib/–with-zlib=/usr/local/ lib/–with-freetype=/usr/local/freetype/
- Make
- Make install
Copy CodeWhen installing JPG, if there is an error, you need to install LIBTOOL:LIBTOOL-1 first. X.tar.gz//is the version I downloaded
- ./configure
- Make
- Make install
- Re-install jpegsrc.v6b.tar.gz
- ./configure--enable-shared--enable-static The default path for these LIB packets is OK.
Copy CodeOtherwise, if the other needs this package, it's going to be a path where it's going to go wrong. 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 conf Igure failed or/libtool--mode=compile gcc-o2-i.-C./jcapimin.c make:./libtool: Command not found make: * * * [Jcapimin.lo] Error 127. /libtool--mode=compile gcc-o2-i.-C./cjpeg.c make:./libtool: Command not found make: * * * [Cjpeg.lo] Error 127 workaround CP/USR/SHARE/LIBT Ool/config/config.guess. Cp/usr/share/libtool/config/config.sub. CP to the JPEG installation file directory, note the following "." Make clean again./configure--prefix=/usr/local/libjpeg/--enable-shared--enable-static make Make install--------------------------------If you have already installed PHP, it is recommended that you enter the "[PHP Extract Directory]/ext/gd" directory by appending the compiled installation, 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 "[PHP installation directory]/lib/php/extensions/no-debug-non-zts-20060613] After successful installation of make makes install Directory to generate the gd.so file, then CP [PHP installation directory]/lib/php/extensions/no-debug-non-zts-20060613/gd.so/opt/php/ext Modify the php.ini file load GD component, add Extension_dir=/opt/php/ext and extension=gd.so, if there is extension_dir=/opt/php/ext do not need to add extension_ Dir=/opt/php/ext extension=gd.so |