Thursday, May 17, 2012

Install Imagick For PHP

Run the following commands (this was on Centos)
# yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make
# cd /usr/local/src
# wget http://pecl.php.net/get/imagick-2.2.2.tgz
# tar zxvf ./imagick-2.2.2.tgz
# cd imagick-2.2.2
# phpize
# ./configure
# make
# make test
# make install
This will compile imagick.so, and move it to your extensions directory specified in php.ini. Now you’ll need to add the following to php.ini:
extension=imagick.so
...and restart Apache:
# service httpd restart