1, installation EnvironmentYum install autoconf ImageMagick imagemagick-devel
A C + + class library is required.
The Java header file is required to compile the so file, so OPENJD must be installed
Yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel
2, install Jmagick
The official web has not been updated, only one github above the project is being maintained.
Https://github.com/techblue/jmagick
Installation Documentation:
Https://github.com/techblue/jmagick/blob/master/INSTALL
there seems to be a problem with git cloning, download the zip package directly.
wget https://github.com/techblue/jmagick/archive/master.zipUnzip Jmagick-master.zipCD Jmagick-masterautoconf./configure-with-java-home=/usr/java/default
make allMake Install
all compile and install no problem on it, and then Lib under the jar and so files, in fact, has been installed in the/usr/local/lib/
-rwxr-xr-x. 1 root root 27609 Nov 10:22 Jmagick-6.7.7.jar
-rwxr-xr-x. 1 root root 146606 10:22 libjmagick-6.7.7.so
lrwxrwxrwx. 1 root root 10:22 libjmagick.so-/libjmagick-6.7.7.so
3,tomcat Startup issues
when Tomcat starts, it needs to increase the parameters, otherwise the initialization is unsuccessful.
java.lang.NoClassDefFoundError:Could not initialize class magick. Imageinfo
workaround, modify the Tomcat boot.
Modify the catalina.sh to add parameters after the comment.
java_opts= "-DJAVA.LIBRARY.PATH=/USR/LOCAL/LIB-DJMAGICK.SYSTEMCLASSLOADER=NO-SERVER-XX:PERMSIZE=256M-XX: maxpermsize=1024m-xms512m-xmx1024m-xx:maxnewsize=256m "
Reference Blog: http://shengren-wang.iteye.com/blog/1167862
4, installation package
The most important is the so file, if it has been compiled, you can copy so files to other servers to use, instead of being compiled.
Centos7 installing the latest Jmagick 6.7. Version 7 using ImageMagick