How to install ImageMagick and php extension Imagick on Debian & DirectAdmin

My config is: Debian 7.0, , DirectAdminphp as php-fpm.

So, first install ImageMagick:

1  apt-get install imagemagick libmagickwand-dev

To check version installed:

1 convert -version

Install php extension – Imagick. Check on http://pecl.php.net/package/imagick latest Imagickstable version and (if you need) adjust code below. Adjust path to your php config too. (line 4 and 5).

 

Voor CentOS 7 
yum install ImageMagick ImageMagick-devel -y

1 wget http://pecl.php.net/get/imagick-3.4.3RC1.tgz
2 tar -zxf imagick-3.4.3RC1.tgz
3 cd imagick-3.4.3RC1
4 /usr/local/php56/bin/phpize
5 ./configure --with-php-config=/usr/local/php56/bin/php-config
6 make
7 make install

Now add to your php.ini (in my case /usr/local/php56/lib/php.ini):

1 extension=imagick.so
My config DirectAdmin / php is php-fpm so I restart php-fpm process:
1 service php-fpm56 restart

 

After this check phpinfo and … I see section Imagick – it’s exist!

voor Debian 8.1

apt-get install libmagickwand-dev libmagickcore-dev

Voor CentOS 7
yum install ImageMagick ImageMagick-devel -y
en volg bovenstaande op


Was this article helpful?

mood_bad Dislike 2
mood Like 2
visibility Views: 40924