HOWTO: Install ImageMagick (IMagick) for PHP on Ubuntu
March 15, 2011 1 Comment
If you don’t have it installed already, install PEAR:
# sudo apt-get install php-pear
Install the Imagick packets:
# sudo apt-get install imagemagick libmagickwand-dev
If you don’t have the PHP5 development packet on your server, you maybe also need to install the following packet:
# sudo apt-get install php5-dev
Now we can install Imagick via PECL:
# sudo pecl install imagick
At this point we have to tell PHP to use Imagick. We can achieve this by putting the following line in the php.ini config file. Just put it at the end of the file. Mine is located at /etc/php5/apache2/php.ini.
extension=imagick.so
We’re nearly done. Restart your Apache2 server now:
/etc/init.d/apache2 restart
That’s it! 😉
Thanks! This saved me a lot of time. My *nix fu is terrible.