建议用jdk1.5.0_12,jmagick的配置有些情况下和jdk的版本有关。测试发现和jdk1.6不兼容
cd /usr/bin/
rm java
rm javac
ln -s /opt/bokee/java/jdk1.5.0_12/bin/java java
ln -s /opt/bokee/java/jdk1.5.0_12/bin/javac javac
如果java javac已经指对目录了,上面就不用设置了
安装jpeg包:
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar -zvxf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure --enable-shared --enable-static ; make ; make install
安装png包:先在http://sourceforge.net/projects/libpng/上下载最新的libpng包
tar -xzvf libpng-1.2.12.tar.gz
cd libpng-1.2.12
cp scripts/makefile.std makefile
make
make install
先在http://www.yeo.id.au/jmagick/上下载最新的ImageMagick和JMagick包
安装ImageMagick包
tar xzvf ImageMagick-6.2.6.tar.gz
./configure --prefix=/opt/ImageMagick --enable-share --enable-static
make
make install
安装JMagick包
tar xzvf JMagick-6.2.6-0.tar.gz
autoconf
./configure --prefix=/opt/JMagick --with-magick-home=/opt/bokee/ImageMagick --enable-share --enable-static --with-java-home=/opt/bokee/java/jdk1.5.0_12
make all
make install
这样就安装完成,接下来的就是配置环境变量。
vi /etc/profile
关于java的环境变量,此文http://www.zzzyk.com有更详细的说明
加入:
JAVA_HOME="/opt/java/jdk1.5.0_12"
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export LD_LIBRARY_PATH=:/opt/JMagick/lib:/opt/ImageMagick/lib
export DYLD_LIBRARY_PATH=:/opt/JMagick/lib:/opt/ImageMagick/lib
export CLASSPATH=$CLASSPATH:/opt/JMagick/lib