This is a How-To install a custom compiled GD, ImageMagick and Perl Interface for GD as well as the freetype, libexif and ghostscript libraries. These products allow for amazing manipulations of images and in particular allow the use of a BiCubic filter in Perl which will produce FAR better thumbnails than the Lanczos filter which is the default filter ImageMagick will use. This How-To is produced by Kevin A. McGrail (kevin@mcgrail.com). URL: http://www.peregrinehw.com/downloads/gd/INSTALL Comments welcome via email! kevin@mcgrail.com NOTE: I use various versions of Redhat Linux & CentOS, so persons using other distributions, beware. These instructions were tested on a CentOS 4.2 i386 Installation. #WGET, UNTAR & INSTALL THE VARIOUS SUPPORT DISTRIBUTIONS #CREATE A TEMP DIR FOR THE TAR FILES rm -rf /tmp/20051229GD/ mkdir /tmp/20051229GD/ cd /tmp/20051229GD/ #GET ALL THE FILES wget http://www.peregrinehw.com/downloads/gd/GD-Perl-2.30.tar.gz wget http://www.peregrinehw.com/downloads/gd/ImageMagick-6.2.6-1.tar.bz2 wget http://www.peregrinehw.com/downloads/gd/gd-2.0.33.tar.gz wget http://www.peregrinehw.com/downloads/gd/libexif-0.6.13.tar.bz2 wget http://www.peregrinehw.com/downloads/gd/freetype-2.1.10.tar.bz2 wget http://www.peregrinehw.com/downloads/gd/freetype-1.3.1.tar.gz wget http://www.peregrinehw.com/downloads/gd/ghostscript-8.15.tar.bz2 wget http://www.peregrinehw.com/downloads/gd/ghostscript-fonts-std-8.11.tar.gz #CLEAR OUT OLD SOURCE rm -rf /usr/src/GD-2.* rm -rf /usr/src/gd-2* rm -rf /usr/src/ImageMagick-5* rm -rf /usr/src/ImageMagick-6* rm -rf /usr/src/libexif-0* rm -rf /usr/src/freetype-* #UNINSTALL DEFAULT RPMS -- EXAMPLE ONLY -- use rpm -qa | grep -e ImageMagick -e gd to find out all the modules #rpm -e gd gd-devel ImageMagick ImageMagick-c++ ImageMagick-c++-devel ImageMagick-perl ImageMagick-devel gnuplot # At this time, we recommend using the stock RPMs for freetype. Eventually, that may change so I am leaving these # changes in place. # # UNINSTALL DEFAULT RPMS - EXAMPLE ONLY # rpm -e freetype freetype-devel --nodeps # # Install FreeType1 # # UPDATED: 12-29-2005 to 1.3.1 # # HOMEPAGE: http://www.freetype.org/freetype1/ # cd /usr/src # tar zxvf /tmp/20051229GD/freetype-1.3.1.tar.gz # # cd freetype-1.3.1 # ./configure --prefix=/usr/local # make # make install # # #IMPORTANT: Add /usr/local/lib to /etc/ld.so.conf file and run ldconfig --verbose # Install FreeType2 # # UPDATED: 12-29-2005 to 2.1.10 # # HOMEPAGE: http://www.freetype.org/ # cd /usr/src # tar jxvf /tmp/20051229GD/freetype-2.1.10.tar.bz2 # cd freetype-2.1.10 # ./configure --prefix=/usr/local # make # make install # # #IMPORTANT: Add /usr/local/lib to /etc/ld.so.conf file and run ldconfig --verbose # Install GD: # # UPDATED: 12-23-02 # UPDATED: 1-26-03 to GD 2.0.11 # UPDATED: 06-22-2003 to GD 2.0.15 # UPDATED: 10-12-2004 to GD 2.0.28 # UPDATED: 03-03-2005 to GD 2.0.33 # # HOMEPAGE: http://www.boutell.com/gd/ cd /usr/src tar zxvf /tmp/20051229GD/gd-2.0.33.tar.gz cd gd-2.0.33/ ./configure #OK to use -j make -j9 make check make install #IMPORTANT: Add /usr/local/lib to /etc/ld.so.conf file and run ldconfig --verbose echo /usr/local/lib > /etc/ld.so.conf.d/local.conf ldconfig -v # Install LibExif: # # ADDED: 06-22-2003 v0.5.9 # UPDATED: 03-03-2005 to libexif v0.6.11 # UPDATED: 12-29-2005 to libexif v0.6.13 # # HOMEPAGE: http://prdownloads.sourceforge.net/libexif/ cd /usr/src tar jxvf /tmp/20051229GD/libexif-0.6.13.tar.bz2 cd libexif-0.6.13/ ./configure make make install #IMPORTANT: Add /usr/local/lib to /etc/ld.so.conf file and run ldconfig --verbose ldconfig -v # Install GhostScript: # # HOMEPAGE: http://www.cs.wisc.edu/~ghost/ cd /usr/src tar jxvf /tmp/20051229GD/ghostscript-8.15.tar.bz2 cd ghostscript-8.15/ ./configure --prefix=/usr/local make make install #NOTE: I am installed ghostscript into /usr/local/. Your system may already include ghostscript # but I did not want to affect the existing installation. # Install GhostScript Fonts: # # HOMEPAGE: http://www.cs.wisc.edu/~ghost/ cd /usr/local/share/ghostscript/ tar zxvf /tmp/20051229GD/ghostscript-fonts-std-8.11.tar.gz # Install ImageMagick: # # UPDATED: 12-23-02 # UPDATED: 01-11-03 -- Upgraded to v5.5.3-2 # UPDATED: 02-01-03 -- Upgraded to v5.5.4-2 # UPDATED: 06-22-03 -- Upgraded to v5.5.7-9 # UPDATED: 10-03-03 -- Upgraded to v5.5.7-11 # UPDATED: 01-24-04 -- Upgraded to v5.5.7-15 # UPDATED: 03-03-05 -- Upgraded to v6.1.3-7 # UPDATED: 12-29-05 -- Upgraded to v6.2.5-5 # UPDATED: 01-31-06 -- Upgraded to v6.2.6-1 # # HOMEPAGE: www.imagemagick.com cd /usr/src tar jxvf /tmp/20051229GD/ImageMagick-6.2.6-1.tar.bz2 cd /usr/src/ImageMagick-6.2.6/ ./configure --with-perl=/usr/local/bin/perl --with-windows-font-dir=/usr/share/fonts/default/TrueType --enable-shared --with-exif=yes --enable-lzw=yes --with-gs-font-dir=/usr/local/share/ghostscript/fonts #OK to use -j make -j9 make install #PERLMAGICK SHOULD BE INSTALL AUTOMATICALLY #cd PerlMagick #perl Makefile.PL #make #make install ldconfig --verbose # Install GD Perl Interface: # # UPDATED: 12-23-02 # UPDATED: 04-16-03 to 2.06 # UPDATED: 06-22-03 to 2.07 # UPDATED: 10-12-04 to 2.16 # UPDATED: 03-03-05 to 2.17 # UPDATED: 12-29-05 to 2.30 # # HOMEPAGE: http://search.cpan.org/author/LDS/ cd /usr/src tar zxvf /tmp/20051229GD/GD-Perl-2.30.tar.gz cd GD-2.30/ perl Makefile.PL # NOTE: If you are using Math::Trig 1.01 or lower, it has a bug that causes a "prerequisite not found" warning to be issued. You may safely ignore this warning. # NOTE2: No longer interactive installation make make test make install #GET RID OF TEMP DIR FOR THE TAR FILES rm -rf /tmp/20051229GD/