Install ImageMagick and PHP-iMagick

What is ImageMagick?

ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats and it is used to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

What is PHP-iMagick?

Imagick is a native php extension to create and modify images using the ImageMagick API

Installation of ImageMagick

1) Download the latest version of ImageMagick from ImageMagick website i.e. (select the mirror near to your server for fast download). Use following command to download ImageMagick

[root@support007 src]# wget

2) Extract and go inside the ImageMagick Folder

[root@support007 src]# tar -zxf ImageMagick-6.5.7-10.tar.gz[root@support007 src]# cd ImageMagick-6.5.7-10

3) Configure: You can run ./configure –help to see the advance option and select the options as per your requirement. I will go ith default settings/configurations

[root@support007 ImageMagick-6.5.7-10]# ./configure

4) Once configure completes (without Error) and you get following screen run make & make install

[root@support007 ImageMagick-6.5.7-10]# make

[root@support007 ImageMagick-6.5.7-10]# make install

If the above commands get executed without any errors, !!! Congratulations you have installed ImageMagick on your Server. Now you can check the Imagemagick version using following command

[root@support007 src]# convert -versionVersion: ImageMagick 6.5.7-10 2009-12-07 Q16 http://www.imagemagick.orgCopyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

Installation of PHP-iMagick

1) Download, extract and go to PHP-iMagick directory

[root@support007 src]# wget
[root@support007 src]# tar zxf imagick-2.3.0.tgz
[root@support007 src]# cd imagick-2.3.0
[root@support007 imagick-2.3.0]#

2) Execute phpize command to prepare the build environment for a PHP extension and after that run “./configure”

[root@support007 imagick-2.3.0]# phpize[root@support007 imagick-2.3.0]# ./configure

3) Run make and make install to complete the installation.

[root@support007 imagick-2.3.0]# make[root@support007 imagick-2.3.0]# make install

4) Add following line in php.ini file to enable imagick extension with PHP. Make sure that the extension is installed in the Directoy mentioned as extension_dir in php.ini

5) Restart Apache Webserver and create a PHPINFO file in web server’s document root with code “”. Now browse the File and check if you get following results

About: Mike

Milind Koyande loves to work on new technologies specially virtualization and troubleshoot server problems. I’m an avid photographer and love to spend my free time close to nature, trying to capture its glory on my camera.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.