Use ImageMagick and centos7imagemagick to install the latest Jmagick 6.7.7 on Centos7.

Source: Internet
Author: User
Tags imagemagick

Use ImageMagick and centos7imagemagick to install the latest Jmagick 6.7.7 on Centos7.
1. install the environment yum install autoconf ImageMagick-devel.
C ++ class library is required.
Java header files are required for compiling so files, so openjd must be installed.
Yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel
2. Install Jmagick
The official website is no longer updated, and only one github project is being maintained.
Https://github.com/techblue/jmagick

Installation document:
Https://github.com/techblue/jmagick/blob/master/INSTALL

It seems that there is a problem with git cloning. Download the zip package directly.
The 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 the compilation and installation work is fine, and then the jar package and so files are under lib. In fact, it has been installed in/usr/local/lib/
-Rwxr-xr-x. 1 root 27609 Nov 27 jmagick-6.7.7.jar
-Rwxr-xr-x. 1 root 146606 Nov 27 libJMagick-6.7.7.so
Lrwxrwxrwx. 1 root 21 Nov 27 libJMagick. so->./libJMagick-6.7.7.so

3. tomcat startup Problems
You must add parameters when starting tomcat. Otherwise, initialization fails.
Java. lang. NoClassDefFoundError: cocould not initialize class magick. ImageInfo

Solution: Modify tomcat startup.
Modify catalina. sh and add the parameter after the annotation.
JAVA_OPTS = "-Djava. library. path =/usr/local/lib-Djmagick. systemclassloader = no-server-XX: PermSize = 256 M-XX: MaxPermSize = 1024 m-Xms512M-Xmx1024M-XX: MaxNewSize = 256 m"

Reference blog: http://shengren-wang.iteye.com/blog/1167862
4. Installation Package
The most important thing is the so file. If it has been compiled, you can copy the so file to other servers, instead of compiling it.


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.