https://gist.github.com/neoneye/00fad388e38f5b0361f66cc1a3b2f57e
Install GraphicsMagick on AWS EC2 running Ubuntu Linux
Install GraphicsMagick on AWS EC2 running Ubuntu Linux - guide.md
gist.github.com
I use GM to render thumbnails of png and jpg images.
Sadly the GM installation guide doesn't describe how to get things working on AWS EC2.
http://www.graphicsmagick.org/INSTALL-unix.html
Prepare for installing GraphicsMagick
PROMPT> sudo apt-get update
PROMPT> sudo apt-get install libpng12-0
PROMPT> sudo apt-get install libjpeg-dev
PROMPT> sudo apt-get install ghostscript
PROMPT> sudo apt-get install libtiff5-dev
PROMPT> sudo apt-get install libfreetype6
PROMPT> sudo apt-get install libfreetype6-dev
Download GraphicsMagick's source code (9 MB). This takes about 10 minutes
PROMPT> wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.26.tar.gz
Unzip and configure GraphicsMagick
PROMPT> tar xzvf GraphicsMagick-1.3.26.tar.gz
PROMPT> cd GraphicsMagick-1.3.26
PROMPT> ./configure
Check that the result of configure looks like this
It must have png and jpg support, otherwise GraphicsMagick won't be to much help making thumbnails.
GraphicsMagick is configured as follows. Please verify that this configuration matches your expectations. Host system type : x86_64-unknown-linux-gnu Build system type : x86_64-unknown-linux-gnu Option Configure option Configured value ----------------------------------------------------------------- Shared libraries --enable-shared=no no Static libraries --enable-static=yes yes GNU ld --with-gnu-ld=yes yes Quantum depth --with-quantum-depth=8 8 Modules --with-modules=no no Delegate Configuration: BZLIB --with-bzlib=yes no DPS --with-dps=yes no FlashPIX --with-fpx=no no FreeType 2.0 --with-ttf=yes yes Ghostscript None gs (9.18) Ghostscript fonts --with-gs-font-dir=default /usr/share/fonts/type1/gsfonts/ Ghostscript lib --with-gslib=no no JBIG --with-jbig=yes yes JPEG v1 --with-jpeg=yes yes JPEG-2000 --with-jp2=yes no LCMS v2 --with-lcms2=yes no LZMA --with-lzma=yes yes Magick++ --with-magick-plus-plus=yes yes PERL --with-perl=no no PNG --with-png=yes yes (-lpng12) TIFF --with-tiff=yes yes TRIO --with-trio=yes no WEBP --with-webp=yes no Windows fonts --with-windows-font-dir= none WMF --with-wmf=yes no X11 --with-x= no XML --with-xml=yes yes ZLIB --with-zlib=yes yes X11 Configuration: Not using X11. Options used to compile and link: CC = gcc CFLAGS = -fopenmp -g -O2 -Wall -pthread CPPFLAGS = -I/usr/include/freetype2 -I/usr/include/libxml2 CXX = g++ CXXFLAGS = -pthread DEFS = -DHAVE_CONFIG_H LDFLAGS = LIBS = -ljbig -ltiff -lfreetype -ljpeg -lpng12 -llzma -lxml2 -lz -lm -lgomp -lpthread
Compile GraphicsMagick
PROMPT> make
PROMPT> sudo make install
Check GraphicsMagick version
PROMPT> gm version
GraphicsMagick 1.3.26 2017-07-04 Q8 http://www.GraphicsMagick.org/ Copyright (C) 2002-2017 GraphicsMagick Group.
Obtain path to gm
PROMPT> which gm /usr/local/bin/gm
nice instruction. thanks so much. one thing to added is to install the build tool if not already.
PROMPT> sudo apt-get install build-essential
'Linux - 운영환경' 카테고리의 다른 글
Startup Script 로 부팅시 명령어를 실행시키자 (0) | 2020.09.17 |
---|---|
Goofys - S3 마운트 하기 (0) | 2020.09.17 |
Linux 시스템 가동시간 및 부팅시간 확인 (uptime / last reboot) (0) | 2020.06.15 |
리눅스 커널 - Tick (인터럽트 관리) (0) | 2020.06.08 |
Ubuntu - lsyncd 실시간 파일 동기화 (0) | 2020.05.13 |