Installing GD on Linux
Installation of GD on Linux CentOS4.3
The GD Graphics Library is a library by Thomas Boutell and others for dynamically manipulating images. Its native programming language is ANSI C, but it has interfaces for many other programming languages. It can create GIFs, JPEGs, PNGs, and WBMPs.GD can create images composed of lines, arcs, text (using program-selected fonts), other images, and multiple colors. Version 2.0 adds support for truecolor images, alpha channels, resampling (for smooth resizing of truecolor images), and many other features.GD supports numerous programming languages including C, PHP, Perl, O'Caml, Tcl, Lua, Pascal, GNU Octave, REXX, and Ruby.GD is extensively used with PHP, where a modified version supporting additional features is included by default as of PHP 4.3 and was an option before that.
How to install GD on Linux Platform?
-Install zlib for gd
download zlib-1.2.3.tar.gz in /usr/local/src
tar -xzvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure –prefix=/usr/local –shared
make
make install
-Install libpng for gd
download libpng-1.2.20.tar.gz in /usr/local/scr
tar -xzvf libpng-1.2.20.tar.gz
cd libpng-1.2.20
./configure –prefix=/usr/local
make check
make install
-Install jpeg for gd
download jpegsrc.v6b.tar1.gz
tar -xzvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure –prefix=/usr/local –enable-shared
make
make install
cp libjpeg.* /usr/lib/
-Install gd
download gd-2.0.35.tar.gz
tar -xzvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure
# change Makefile as
# CFLAFS=-g -O2 -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_XPM -DHAVE_LIBTTF
# LIBS=-lgd -lpng12 -lz -ljpeg -lXpm -lttf
make # may end as error first, but do not make twice, then it will go
make install
- 576 reads
Recent popular content



















