Skip to content

Instantly share code, notes, and snippets.

@primeobsession
Last active June 4, 2022 00:40
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save primeobsession/f9d30c5ebc8b0486de14 to your computer and use it in GitHub Desktop.
Save primeobsession/f9d30c5ebc8b0486de14 to your computer and use it in GitHub Desktop.
Install latest version of ImageMagick on Amazon Beanstalk
# 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