-
-
Save masitings/376b53e47a69a77cbfcc60c680d66c17 to your computer and use it in GitHub Desktop.
Install ImageMagick / Imagick 3.4.4 on PHP 7.4 server (Laravel Forge)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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.4.tgz | |
| tar xvzf imagick-3.4.4.tgz | |
| cd imagick-3.4.4 | |
| phpize | |
| ./configure | |
| make install | |
| rm -rf /tmp/imagick-3.4.4* | |
| echo extension=imagick.so >> /etc/php/7.4/cli/php.ini | |
| echo extension=imagick.so >> /etc/php/7.4/fpm/php.ini | |
| service php7.4-fpm restart | |
| service nginx restart |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation for PHP 7.4
Make sure you have ImageMagick installed (see below)
If you have ImageMagick installed, perform the following two commands:
wget https://gist.githubusercontent.com/danielstgt/dc1068e577bbd8b6e9a6050a6db1f9c3/raw/4687280a25513ce825f3ffcd31661b67f5896850/imagick3.4.4-PHP7.4-forge.sh
sudo bash imagick3.4.4-PHP7.4-forge.sh
Done!
Install ImageMagick (only if not installed already)
sudo apt install imagemagick
You can confirm the installation with:
convert -version
This should show you something like:
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml z