Software Installs

Installing ImageMagick

ImageMagick — an open source software suite for displaying, converting, and editing image files — is a common requirement for other pieces of software that have image manipulation functionality, so we see requests to install it pretty often. Thankfully, installing ImageMagick is fairly easy. Following are some simple instructions for installing both ImageMagick and its PHP module, Imagick, on a CentOS server running cPanel.

This article assumes knowledge of working on the command line via SSH. If you are new to working on the command line, check out our article on SSH basics. Alternatively, you can always open a support ticket in your customer portal and ask for assistance.

Step one: install ImageMagick from source

This install is for CentOS servers:

cd /usr/local/src
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick*
./configure --enable-shared --disable-openmp
make && make install

Step two: test the installation

/usr/local/bin/convert -version

If that returns a response, the installation is good.

Step three: clean up your files

rm -rf /usr/local/src/ImageMagick*

Step four: install the PHP module

You can grab the PHP module from PECL, then install from source:

cd /usr/local/src
pecl download imagick
tar -xvzf imagick*.tgz
cd imagick*
ln -s /usr/local/include/ImageMagick-6 /usr/local/include/ImageMagick
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
phpize
./configure && make && make install
echo 'extension=imagick.so' >> /usr/local/lib/php.ini

Verify that the module is correctly added in:

php -m | grep imagick

Then restart Apache and clean up your files:

/etc/init.d/httpd restart
rm -rf /usr/local/src/imagick*

That’s it!

Photo by Jim Bumgardner

Find out more about ServInt solutions

Starting at $25

Comments
  1. @Joe, We run our servers with a particular set of minmum packages that suite the needs of most our clients, without giving everyone bloated setups. Surprisingly, ImageMagick isn't as often requested as you might think. Many times over, PHP GD is sufficient for software prerequisites, which GD does come with our servers.
    Jacob "Boom Shadow" Tirey /
  2. Don't you even install Imagemagik by default on your server with cPanel? Even the cheapest crappiest host do install it by default.
  3. Great idea for a technical series. It's brief, but it shows all the info you need.
  • Hosting Advice
  • The New York Times
  • The Hill
  • Bloomberg
  • The Seattle Times
  • Computer World
  • Ars Technica
  • MSNBC

To engage with the ServInt Sales Team use the following chat icon. Normal sales hours are Monday-Friday 9am-5pm EST but feel free to leave a message and we will follow up as soon as possible.

Sales Chat



To engage with the ServInt Support Team you must be logged into our Customer Portal for identity verification and have a ticket opened about your request or there will only be limited support offered.

Support Chat

CLOSE