How to install imagemagick in a cpanel server – Command-line option

imagemagik installation

Yes, the imagemagik installation steps are simple for a cPanel server. Before installing you must have an idea about imagemagik.

It’s simply an addon for your cPnel server that allows for image manipulation. ImageMagick® is a software suite to create, edit, compose, or convert bitmap images.

It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PNG, Postscript, SVG, and TIFF.

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.

1, How to install via command-line

Step I : How to check whether the Imagemagick installed or not on the server?

You may first check if it is already installed on the server. You can use the following way to figure it out from the command line.

1, /scripts/checkimagemagick
2, /usr/bin/convert --version

Step II : Installation

/scripts/installimagemagick

This will take a couple of minute to complete. After installation you can check the version by executing the command, /usr/bin/convert –version

See the sample output,

root@server [~]# /usr/bin/convert --version
Version: ImageMagick 6.5.4-7 2014-02-10 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

How to uninstall imagemagik from command line?

It’s simple, do execute the following command to remove imagemagik from your server.

/scripts/cleanimagemagick

2, Installation steps via WHM control panel

I : Login to WHM control panel.
II : Do follow these steps,

Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the box below “Install a PHP Pecl” enter “imagick” and click “Install Now” button.

III : Restart apache.

imagick

Un-installation steps via WHM control panel:

It’s also simple to uninstall or remove imagemagick from the server. You can refer the steps pasted below for painless uninstallation.

I : Login to WHM control panel.
II : Do follow these steps,

Imagick: WHM -> Software -> Module Installers -> PHP Pecl (manage). Click on Uninstall button for Imagick

III : Restart apache.

3, Installation on CloudLinux installed server

In a CloudLinux installed server there is an additional step to enable packages to users on that server. Installing packages on the server wont reflect in these cases.

It won’t be available inside CageFS. You will want to install ImageMagick inside CageFS as follows to make those binaries available inside CageFS:

How to check the list of RPMs currently installed under CageFS:

cagefsctl --list-rpm

To add a new RPM:

cagefsctl --addrpm ImageMagick

To pick up the changes:

cagefsctl --force-update

That’s it.

Also read:

 

How to enable Varnish on cPanel server?

Enable Varnish on cPanel. Varnish is a caching technology. It is a web accelerator and also referred as HTTP accelerator or reverse HTTP proxy, which will significantly enhance the performance of your website.

Varnish cache is really fast thereby, speed up the delivery depending on your architecture.

It will enhance your website’s performance. Varnish stores a copy of the page which is served by the web server the first time a user visits the website. Next time, when the user requests for the same page, varnish will serve the copy instead of serving it from the web server.

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

4 thoughts on “How to install imagemagick in a cpanel server – Command-line option

  1. While installing Imagemagick on a cloudlinux server, do we have to do step 1 and 2 mentioned above or just the step 3 (cagefsctl –addrpm ImageMagick) ?

    Thanks

  2. Hi
    this is the only tutorial that works. Installing via Software. It took’s me 2 days to figure out on how to install imagick with command line.

    I put this way agin in here so people who are searching for installing imagick on centos 7.

    Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the box below “Install a PHP Pecl” enter “imagick” and click “Install Now” button.

    Thank you indeed.
    Best regards.
    Omer

Leave a Reply

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