Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webinfinita/25180737f2115b8f7270 to your computer and use it in GitHub Desktop.
Save webinfinita/25180737f2115b8f7270 to your computer and use it in GitHub Desktop.
Install Imagick 3.4.0 on PHP 7.0 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.0.tgz
tar xvzf imagick-3.4.0.tgz
cd imagick-3.4.0
phpize
./configure
make install
rm -rf /tmp/imagick-3.4.0*
echo extension=imagick.so >> /etc/php/7.0/cli/php.ini
echo extension=imagick.so >> /etc/php/7.0/fpm/php.ini
service php7.0-fpm restart
service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment