Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»How to Install ImageMagick on CentOS & RHEL

    How to Install ImageMagick on CentOS & RHEL

    By RahulNovember 17, 20152 Mins Read

    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.

    Advertisement

    ImageMagick is typically used from command line. Also we can use it from any programming language by using its interface like Magick.NET (.Net),IMagick (PHP), PerlMagick (Perl) etc. This article will help you to install ImageMagick on CentOS, RHEL Servers

    Step 1. Install Required Packages

    First we need to install required packages in order to install ImageMagic and IMagick PHP extension.

    # yum install gcc php-devel php-pear
    

    Step 2. Install ImageMagick

    After installing required packages, let’s install ImageMagick using following command.

    # yum install ImageMagick ImageMagick-devel
    

    Step 3. Install ImageMagick PHP Extension

    At this point you have successfully installed ImageMagick package on your system. Now are are going to install ImageMagick php extension, So that we can use it through php code.

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

    Step 4. Restart Apache and Check Extension

    After completing above steps you need to reload apache service to enable php exension using following command

    # service httpd reload
    

    Click here to read more details about ImageMagick setup and there uses.

    imagemagick imagick PHP
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Split Large Archives in Linux using the Command Line

    System.out.println() Method in Java: A Beginner’s Guide

    sleep Command in Linux with Examples

    View 8 Comments

    8 Comments

    1. Bien Thuy on August 19, 2020 11:56 am

      Hi Rahul,
      I have Centos VPS and try to run: pecl install imagick
      But it show error:

      Warning: popen() has been disabled for security reasons in PEAR/Builder.php on line 525
      PHP Warning: popen() has been disabled for security reasons in /usr/share/pear/PEAR/Builder.php on line 525
      ERROR: failed to run `phpize’

      Could you please help me? How to fix it?

      Reply
    2. aRNoLD on September 27, 2019 6:10 am

      CentOS 8 was officially released two days ago. Many apps have been updated to date, but it seems that ImageMagick is missing. Follow the instructions above, say installing by issuing ‘yum install gcc php-devel php-pear’ before yum installing ImageMagick, just could not make it. I guess there’s been some changes inside CentOS 8. Mr Kumar, would you post a new instruction here? Thank you.

      Reply
    3. CC on January 22, 2018 9:28 pm

      Hi I have run all this and no errors however I don’t seem to have the commands installed. Have I missed some point with this install. It seems to have installed PHP knows about it ok, in so far as phpinfo is concerned
      Imagick compiled with ImageMagick version ImageMagick 6.7.8-9 2016-06-16 Q16 http://www.imagemagick.org

      Centos7 php7.2

      Reply
      • CC on January 22, 2018 9:57 pm

        All fixed thank you, I was not looking in all the right places and it all works great

        Cheers

        Reply
    4. Ramki on November 24, 2017 10:35 am

      Fine Working

      Reply
    5. Chamantha on October 2, 2017 8:09 am

      Thanks It works!

      Reply
    6. Stavros on September 26, 2017 12:20 pm

      great tutorial Rahul… can you tell us how to update also?

      Reply
    7. Jaki on April 10, 2017 4:29 pm

      Thanks. Yeah now i installed imagemagick without any errors.

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to Split Large Archives in Linux using the Command Line
    • System.out.println() Method in Java: A Beginner’s Guide
    • Split Command in Linux With Examples (Split Large Files)
    • Test Your Internet Speed from the Linux Terminal
    • 11 Practical Example of cat Command in Linux
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.