Linux Installation GD Library

Source: Internet
Author: User
Tags curl imap

GD Installation

The first thing to do is to install GD into the system, and install GD before the installation of jpeg-6b, libpng, Zlib, FreeType. Here is the download URL:
GD 2.0.33
jpeg-6b
Libpng 1.2.8
Zlib 1.2.3
Freetype-2.1.10.tar.gz

Code:

wget http://www.boutell.com/gd/http/gd-2.0.33.tar.gz 
wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz 
wget http://nchc.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.8-config.tar.gz 
wget http://www.zlib.net/zlib-1.2.3.tar.gz 
wget http://prdownloads.sourceforge.net/freetype/freetype-2.1.10.tar.gz?download

Installation zlib

#不要用-prefix Specifies that the installation directory will affect GD

Code:

tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure  #或者 CFLAGS="-O3 -fPIC" ./configure   #如果64位处理器需要 CFLAGS="-O3 -fPIC" 
make
make install

Reference:

Installing zlib-1.2.3.tar.gz
Modify the Makefile File
Find Cflags=-o3-duse_mmap
By adding-fpic to the back, it becomes cflags=-o3-duse_mmap-fpic.

Installation FreeType

Code:

tar zxvf freetype-2.1.10.tar.gz
cd freetype-2.1.10
./configure -prefix=/usr/local/freetype
make
make install

Installation libpng
#不要用-prefix Specifies that the installation directory will affect GD

Code:

tar zxvf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
./configure
make
make install

=====有些用法=====
cp scripts/makefile.linux makefile
make 
make install
===============

Installation jpeg-7

Code:

tar zxvf jpegsrc.7.tar.gz
cd jpeg-7
./configure -prefix=/usr/local/jpeg --enable-shared --enable-static
make
make install
=====有些用法=====
CFLAGS="-O3 -fPIC" ./configure   #如果64位处理器需要 CFLAGS="-O3 -fPIC" 
make
make install-lib
===============

This step may be wrong, the main reason is not to self-build the folder, to the problem, less the folder, you can use the Madir command to build the folder will be able to resolve

Installed GD

Code:

tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure -prefix=/usr/local/gd -with-jpeg=/usr/local/jpeg -with-png -with-zlib -with-freetype=/usr/local/freetype
make
make install

The next step is to configure PHP.
Note: Install the IMAP method first download Imap2006e.tar.gz.z
In PHP, add-with-imap= to unpack the folder after downloading.
This is also a little bit of a problem, in the Maik will be utf8_mime2text wrong, the solution is to find out the PHP source file under the Ext/php_imap.c this file, and then use VI warrant him, find Utf8_mime2text, and then delete the two lines.
And then re-edit the PHP to resolve


PHP Configuration
Now you need to re-edit the PHP, and choose to support GD, if the system has deleted the original PHP code, you can download to php.net, and then enter the following command:
Please add the following after configure
-with-gd=/usr/local/gd
-with-jpeg-dir=/usr/local/jpeg6-with-zlib-with-png
-with-freetype-dir=/usr/local/freetype


Code:

--prefix=/usr/local/php --enable-sockets --enable-xsl --enable-xml --with-apxs2=/usr/local/apache/bin/apxs --witlih-mysql=/usr/local/mysql --enable-json --enable-mbstring --enable-pdo --enable-libxml --enable-simplexml --enable-xmlreader --enable-xmlwriter --with-zlib --with-pdo-mysql=/usr/local/mysql --with-curl=/usr/local/curl --with-jpeg-dir=/usr/local/jpeg -with-png  --with-gd=/usr/local/gd --with-freetype-dir=/usr/local/freetype

Linux Installation 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.