How to install the GD Library in php5

Source: Internet
Author: User
How to install the GD Library in php5

  1. Cd libpng-1.2.40
  2. Mv scripts/makefile. linux./Makefile # Make sure to use Makefile under script instead of using./configure

Generation:

  1. Make
  2. Make install

2, download freetype library, many GD functions need this library support http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.3.5.tar.gz

After decompression, go to the directory:

  1. Cd freetype-2.3.5
  2. ./Configure -- prefix =/usr/local/freetype # specify the freetype installation directory for php compilation
  3. Make
  4. Make install

3. download GD Library select the appropriate version download from the http://www.libgd.org

After decompression, go to the directory:

  1. ./Configure -- prefix =/usr/local/gd2 -- with-png -- with-freetype # you do not need to specify the freetype Directory. you must specify the installation path of the gd Library.
  2. Make
  3. Make install

4. compile PHP

Go to the php source code directory:

  1. ./Configure -- with-apxs2 =/usr/local/apache2/bin/apxs -- with-mysql -- without-sqlite --
  2. Without-pdo-sqlite -- with-gd =/usr/local/gd2 -- with-freetype-dir =/usr/local/freetype/
  3. Make
  4. Make install

Restart the apache service to install the PHP5 GD Library.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.