How to install ImageMagick and PHP-imagick on Linux Plesk

The installation for ImageMagick and PHP-imagick is pretty simple for Linux Plesk server. Following the steps to install them on Plesk server:

ImageMagick Installation:

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

PHP-imagick Installation:
[root@server ~]# yum install gcc
[root@server ~]# yum install make automake
[root@server ~]# yum install php-pear
[root@server ~]# yum install php-devel
[root@server ~]# pecl install imagick

This will create a imagick.so file under /usr/lib/php/modules/ on 32-bit operating machine and /usr/lib64/php/modules/imagick.so on 64-bit operating system. You will have to add this extension in your global (loaded PHP condifuration file). You will need to add following line to enable extension:

extension = “imagick.so”

After adding the above extension, you will need to restart your Apache service. You can use the following command to restart it:

[root@server ~]# /etc/init.d/httpd restart

Now, you can verify your installation using the following commands:

For ImageMagick:

[root@server ~]# which convert

Output should be as follow:

/usr/bin/convert

For PHP-imagick:

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

Output should be as follow:

imagick

Leave a Reply