Install Imagemagick on CentOS

This article will show you how I successfully installed Imagick on Centos. And we have many ways to install. And I will show you 2 ways to install Imagick, you can choose either way.

How to Install Imagemagick on CentOS

I. Installation of ImageMagick via Repository

1. Install required packages

Start off by installing the prerequisites

yum install gcc php-devel php-pear

php-pear: PHP pear extension

gcc: the GCC extension

php-devel: the PHP-devel extension

2. List all installed and available packages

Issue the following to verify whether you have Imagemagick available via the current repositories

yum list ImageMagick*

You should see something similar to the result below:

How to Install Imagemagick on CentOS - yum list ImageMagick

3. Install ImageMagick

Issue the following to install ImageMagick:

yum install ImageMagick ImageMagick-devel

Now install the imagick library for PHP:

pecl install imagick

 

Load the imagick extension into PHP:

echo extension=imagick.so > /etc/php.d/imagick.ini

 

Restart Apache

service httpd restart

 

To verify that imagick has been successfully installed, do any of the following

php -m | grep imagick

Or check your PHPINFO.

II. Installation of ImageMagick from Source

Prerequisites

sudo yum groupinstall "Development Tools" -y
sudo yum install bzip2-devel libtiff-devel giflib-devel ghostscript-devel libwmf-devel jasper-devel libXext-devel libXt-devel librsvg2-devel OpenEXR-devel libwebp-devel lcms2-devel -y

1. Download the Source Code:

Navigate to the ImageMagick download page on the official ImageMagick website to find the link for the latest stable release (usually a .tar.gz file). Download it to your server, typically in the /usr/local/src directory:

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *