#Ubuntu系统中直接用如下命令,安装需求的ImageMagick库文件
sudo apt-get install libmagickwand-dev libmagickcore-dev
#其他系统可以手动编译ImageMagick
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar -xzvf ImageMagick
cd ImageMagick-7.0.10-25
./configure --prefix=/usr/local/imagemagick
make && make install
ln -s /usr/local/imagemagick/include/ImageMagick-7 /usr/local/imagemagick/include/ImageMagick
#安装imagic
cd ..
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xvzf imagick-3.4.4.tgz
cd imagick-3.4.4
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick
make && make install
vim /usr/local/php/etc/php.d/03-imagick.ini
#增加以下内容
extension=imagick.so
service php-fpm restart