Installation of ImageMagick
From MovableType
ImageMagick is a beast of a program to get installed, yet it is required for virtually any type of image manipulation on most systems. For Movable Type, ImageMagick is required for:
- thumbnail generation
- captcha generation
Movable Type supports both ImageMagick (also known as PerlMagick, if in reference to the perl module) and NetPBM for image manipulation, however the lionshare of testing and QA is performed upon ImageMagick based installations.
This guide is to help users get ImageMagick and PerlMagick installed on their system.
Contents |
Linux, CentOS, RedHat et al
The most reliable way to get ImageMagick installed on an RPM based system is by executing the following commands:
yum install glib yum install glib2 yum install libpng yum install libjpeg yum install libtiff yum install ghostscript yum install freetype yum install ImageMagick yum install ImageMagick-perl
cPanel RPM-based Web hosts
Note: If you don't have root access to your server, I'd recommend you go with a local NetPBM installation as cPanel's default ImageMagick installation has some issues with MovableType.
If the above yum method doesn't work and you have an RPM-based system, you can try to install ImageMagick and PerlMagick from source. This is for RPM-based distributions (Fedora, CentOS, RedHat) and has been tested fine with MT 3.x, but it detects fine with mt-check.cgi for MT 4.x.
First, remove any old RPM installs:
rpm -qa | grep -i Magick rpm -e anything that pops up
Go to your favorite install directory (/usr/src or whatever):
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz tar xvzf ImageMagick.tar.gz
Go into the directory you just extracted:
cd new folder name
Configure it with whatever crazy stuff you need:
./configure --enable-shared --with-modules --without-x --with-gs-font-dir=default --with-perl=yes --with-xml=yes --with-zlib=yes --with-jpeg=yes
Install:
make && make install
Then you need to get PerlMagick installed so MovableType will function properly. From the directory you're in after the above installation:
cd PerlMagick perl Makefile.PL make make install
Note In case the above doesn't work - there are some additional steps to build ImageMagick and PerlMagic here.
Mac OS X
Using MacPorts
If you're using MacPorts, the easiest way to install ImageMagick is to run "sudo port install ImageMagick +perl". Using the "+perl" variant as shown means you do not have to install the "p5-perlmagick" package, which is currently broken as of May 2008.
Installing from source
I've successfully built and installed ImageMagick and PerlMagick on MacOS 10.5 (and 10.5.1) (Leopard). The key is to compile ImageMagick from source, and then compile PerlMagick from source after you've installed ImageMagick. This way, the ImageMagick install sets the PerlMagick configuration properly for your installation.
ImageMagick itself has a lot of dependencies for it to work properly. My strong advice would be to follow this tutorial for installing ImageMagick for Rails, and then install PerlMagick from within the ImageMagick source directory.
Windows
There is a PPM of PerlMagick for ActiveState Perl on the following repository, that includes all binary dependencies for a 32-bit Windows environment: