-
- tar zxvf zlib-1.2.3.tar.gz
- cd zlib-1.2.3
- ./configure --prefix=/usr/local/zlib
- make
- make install
Copy code
2. Install libpng
-
- tar zxvf libpng-1.2.8.tar.tar
- cd libpng-1.2.8
- mv ./scripts/makefile.linux ./makefile
- make
- make install
-
Copy code
Note that the makefile here is not generated using ./configure, but copied directly from scripts/.
3. Install freetype
-
- tar zxvf freetype-2.1.10.tar.gz
- cd freetype-2.1.10
- ./configure --prefix=/usr/local/freetype
- make
- make install
Copy code
4, install Jpeg
-
- tar zxvf jpegsrc.v6b.tar.gz
- cd jpeg-6b/
- ./configure --enable-shared
- make
- make test
- make install
-
Copy code
Note, configure Be sure to bring the --enable-shared parameter, otherwise the shared library will not be generated.
5. Install GD library
- 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
-
Copy the code
6, recompile PHP
- tar zxvf php-4.3.9.tar.gz
- cd php-4.3.9
- ./configure (previous parameters) --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
-
Copy the code
Use the above Download address of the library file:
1. Download gd library: http://www.libgd.org/releases/
2. Download zlib library: http://www.zlib.net/
3. Download the libpng library: http://www.libpng.org/pub/png/libpng.html
4. Freetype download: http://ftp.twaren.net/Unix/NonGNU/freetype/
5. jpeg7 download: http://download.chinaunix.net/download.php?id=28882&ResourceID=5095
|