Last active
June 4, 2022 00:40
-
-
Save primeobsession/f9d30c5ebc8b0486de14 to your computer and use it in GitHub Desktop.
Install latest version of ImageMagick on Amazon Beanstalk
This file contains 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
# Check if this is the very first time that this script is running | |
if ([ ! -f /root/.not-a-new-instance.txt ]) then | |
newEC2Instance=true | |
fi | |
if ([ $newEC2Instance ]) then | |
whoami | |
cd /tmp | |
rm -rf ImageMagick* | |
yum groupinstall -y "Development Tools" | |
yum install -y libpng-devel libwebp-devel freetype-devel libjpeg-devel libtiff-devel | |
wget http://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar zxf ImageMagick.tar.gz | |
cd ImageMagick* | |
./configure --with-quantum-depth=8 --without-x | |
make | |
make install | |
fi | |
# If new instance, now it is not new anymore | |
if ([ $newEC2Instance ]) then | |
echo -n "" > /root/.not-a-new-instance.txt | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment