Centos7 installing the latest Jmagick 6.7. Version 7 using ImageMagick

Source: Internet
Author: User
Tags imagemagick

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.