安裝相關依賴
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
下載並解壓縮
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.29.tar.gz tar -zxvf GraphicsMagick-1.3.29.tar.gz
編譯並安裝相關依賴
cd /usr/local/GraphicsMagick-1.3.29 ./configure --prefix=/usr/local/GraphicsMagick-1.3.29 make make install
下載並解壓縮
echo 'PATH=$PATH:$GMAGICK_HOME/bin' > /etc/profile.d/graphicsmagick.sh && source /etc/profile
編譯並安裝
gm version
設定環境變數
gm convert -list formats