ImageMagick Installation on Centos

ImageMagick is an open source command line software used for Image manipulation purposes. It helps us to convert, display and edit image files. We can manipulate images in many formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF and make it suitable for our web applications.

We can easily install it to our server using yum or from source packages. In order to complete the installation type the following command as root user.

[root@HostDire ~]# yum install gcc php-pear php-devel

php pear package is required to install imagick using PECL.

[root@HostDire ~]#
[root@HostDire ~]# yum install ImageMagick
[root@HostDire ~]# yum install ImageMagick-devel

The above commands will automatically install ImageMagick ImageMagick-devel and all its dependencies.

Next we need to install the php extension using PECL.

[root@HostDire ~] # pecl install imagick

Enable the extension in configuration file.

[root@HostDire ~] # echo “extension=imagick.so” > /etc/php.d/imagick.ini

Finally, we have to restart the web server to reflect the changes.

[root@HostDire ~] # /etc/init.d/httpd restart
or
[root@HostDire ~] # service httpd restart

You can verify the installation status with the help of below command

[root@HostDire ~] # php -m | grep imagick

If you experience any issues during installation, then get back to us.

Total
0
Shares
Leave a Reply

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

Related Posts