This article will help you to install ImageMagick on Ubuntu, Debian & LinuxMint operating systems.
First we need to install required packages in order to install ImageMagick and IMagick PHP extension.
sudo apt-get install php5 php5-common gcc
After installing required packages, let’s install ImageMagick using following command.
sudo apt-get install imagemagick
Now ImageMagick package have successfully installed on your system,Now are are going to install ImageMagick php extension, So that we can use it through php code.
sudo apt-get install php5-imagick
After completing above steps you need to reload apache service to enable php exension using following command:
service apache2 reload
To verify that module is enabled properly.
# php -m | grep imagick imagick
You can also create phpinfo() file to view imagemagick on web browser.