下载
cd /usr/local/src/
wget http://ftp.icm.edu.pl/pub/unix/graphics/GraphicsMagick/1.3/GraphicsMagick-1.3.21.tar.gz

解压
tar zxvf GraphicsMagick-1.3.21.tar.gz
rm -rf GraphicsMagick-1.3.21.tar.gz

安装
cd GraphicsMagick-1.3.21
./configure
make -j8
make install

测试
gm version

加入PHP:
yum install php71w-pear
yum install ImageMagick-devel
pecl install imagick

vi /etc/php.ini
加入行:extension=imagick.so

重启PHP:
service php-fpm stop
service php-fpm start

输出以下信息说明安装成功:
GraphicsMagick 1.3.21 2015-02-28 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2014 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.

Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP no
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG no
JPEG-2000 no
JPEG yes
Little CMS no
Loadable Modules no
OpenMP yes (201107)
PNG yes
TIFF yes
TRIO no
UMEM no
WebP no
WMF no
X11 no
XML no
ZLIB yes

Host type: x86_64-unknown-linux-gnu

Configured using the command:
./configure

Final Build Parameters:
CC = gcc -std=gnu99
CFLAGS = -fopenmp -g -O2 -Wall -pthread
CPPFLAGS = -I/usr/include/freetype2
CXX = g++
CXXFLAGS = -pthread
LDFLAGS = -L/usr/lib
LIBS = -ltiff -lfreetype -ljpeg -lpng15 -lz -lm -lgomp -lpthread

OK,至此,GraphicsMagick安装完成。

标签: none

添加新评论