Home > Backend Development > PHP Tutorial > Installation steps to add GD library to php under linux

Installation steps to add GD library to php under linux

WBOY
Release: 2016-07-25 08:55:19
Original
1542 people have browsed it
  1. tar zxvf zlib-1.2.3.tar.gz
  2. cd zlib-1.2.3
  3. ./configure --prefix=/usr/local/zlib
  4. make
  5. make install
Copy code

2. Install libpng

  1. tar zxvf libpng-1.2.8.tar.tar
  2. cd libpng-1.2.8
  3. mv ./scripts/makefile.linux ./makefile
  4. make
  5. make install
Copy code

Note that the makefile here is not generated using ./configure, but copied directly from scripts/. 3. Install freetype

  1. tar zxvf freetype-2.1.10.tar.gz
  2. cd freetype-2.1.10
  3. ./configure --prefix=/usr/local/freetype
  4. make
  5. make install
Copy code

4, install Jpeg

  1. tar zxvf jpegsrc.v6b.tar.gz
  2. cd jpeg-6b/
  3. ./configure --enable-shared
  4. make
  5. make test
  6. 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

  1. tar zxvf gd-2.0.33.tar.gz
  2. cd gd-2.0.33
  3. ./configure --with-png --with-jpeg --with-freetype=/usr/local/freetype
  4. make
  5. make install
Copy the code
6, recompile PHP

  1. tar zxvf php-4.3.9.tar.gz
  2. cd php-4.3.9
  3. ./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
  4. make
  5. 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


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template