How to Install ImageMagic on CentOS/RHEL

ImageMagick is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats like GIF, JPEG, PNG, Postscript, and TIFF. We can also use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

Install ImageMagic on CentOS/RHEL

Follow the below command to install ImageMagic on CentOS/RHEL.

1. Install Required Packages

First of all you need to install required packages if not installed to install ImageMagic and IMagic PHP extension.

# yum install gcc php-devel php-pear

2. Install ImageMagic

Now run the below command to install ImageMagic.

# yum install ImageMagick ImageMagick-devel

3. Install ImageMagick PHP Extension

You have effectively installed ImageMagick bundle on your system. Presently we have to introduce ImageMagick php extension. Use following command to install ImageMagick php extension.

# pecl install imagick
# echo "extension=imagick.so" > /etc/php.d/imagick.ini

4. Restart Apache

Now restart the apache web service.

# service httpd reload
Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at Look Linux Submit Article. Stay connected to Facebook.

About the author


Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment