Install related dependencies
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
Copy after login
Download and unzip
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.29.tar.gz tar -zxvf GraphicsMagick-1.3.29.tar.gz
Copy after login
Compile and install
cd /usr/local/GraphicsMagick-1.3.29 ./configure --prefix=/usr/local/GraphicsMagick-1.3.29 make make install
Copy after login
Set environment variables
echo 'PATH=$PATH:$GMAGICK_HOME/bin' > /etc/profile.d/graphicsmagick.sh && source /etc/profile
Copy after login
Check whether the installation is successful
gm version
Copy after login
View the supported image list
gm convert -list formats
Copy after login