Linux PHP installation GD library

Source: Internet
Author: User
The following are the steps to add a GD library to PHP under Linux:


First, download

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.gz http://sourceforge.net/projects/freetype/
Php-4.3.9.tar.gz http://www.php.net


Second, installation

1. Installing zlib

Tar zxvf zlib-1.2.2.tar.gz
CD zlib-1.2.2
./configure
Make
Make install

2. 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
Note 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

4. Install JPEG

Tar zxvf jpegsrc.v6b.tar.gz
CD jpeg-6b/
./configure--enable-shared
Make
Make Test
Make install
Note 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

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--with-png--with-jpeg--with-freetype-- Enable-sockets
Make
Make install

Phpinfo ();
?>

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