Skip to content

Instantly share code, notes, and snippets.

@maliMirkec
Created June 15, 2015 06:03
Show Gist options
  • Save maliMirkec/ad9229a47f96eef5a2c8 to your computer and use it in GitHub Desktop.
Save maliMirkec/ad9229a47f96eef5a2c8 to your computer and use it in GitHub Desktop.
How to install and include ImageMagick on ubuntu
// update package list
sudo apt-get update
// install ImageMagick
sudo apt-get install imagick
// test if ImageMagick is working
cd /path/to/folder/with/images/ && convert -negate image.gif output.gif
// install php imagick
sudo apt-get install php5-imagick
// check php extension dir for imagick.so
php-config --extension-dir
// include imagick.so extension in php.ini: extension=imagick.so
// restart server
service apache2 restart
// check if imagick is loaded
php -m
or
php -m | grep imagick
// Viola - you've successfully installed ImageMagick!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment