PHP5 How to install GD Library _php Tutorial

Source: Internet
Author: User
You should have some knowledge of the GD library, which is an important library for PHP to manipulate graphics and text. So today we're going to give you a concrete explanation of how PHP5 installation of GD library 1. Download the libpng library, you need to support at least one file type, if other types are required to download separately

Http://nchc.dl.sourceforge.net/project/libpng/00-libpng-stable/1.2.40/libpng-1.2.40.tar.gz

After decompression, go to Folder

CD libpng-1.2.40

MV Scripts/makefile.linux./makefile #这里一定要使用script下的Makefile, do not pass./configure

Generated

Make

Make install

PHP5 Installing GD library 2. Download the FreeType library, many of the GD functions require support for this library

Http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.3.5.tar.gz

3. After decompression

CD freetype-2.3.5

The./configure--prefix=/usr/local/freetype #这里指定freetype的安装目录 so that PHP is compiled with

Make

Make install

PHP5 Installing GD library 4. Download GD Library

Choose the right version to download from http://www.libgd.org

Enter directory after decompression

./configure--prefix=/usr/local/gd2--with-png--with-freetype #这里不需要制定freetype目录,

However, the installation path of the GD library needs to be established

Make

Make install

PHP5 Installing GD Library 5. Compiling PHP

Enter the PHP source directory

./configure--WITH-APXS2=/USR/LOCAL/APACHE2/BIN/APXS--with-mysql--without-sqlite--

Without-pdo-sqlite--WITH-GD=/USR/LOCAL/GD2--with-freetype-dir=/usr/local/freetype/

Make

Make install

Restart Apache to complete the PHP5 installation of the GD library.


http://www.bkjia.com/PHPjc/446422.html www.bkjia.com true http://www.bkjia.com/PHPjc/446422.html techarticle you should have some knowledge of the GD library, which is an important library for PHP to manipulate graphics and text. So today we'll explain how to do PHP5 installation of GD library 1. Download libpng library, at least ...

  • 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.