Вы находитесь на странице: 1из 3

ADORE DJATOKA 1.

1 installation
This document will cover the steps to install djatoka on 2 operating systems, Ubuntu 64 bit and
Windows 7 64 bit.

Download here

Ubuntu Prerequisites:
-Oracle Java SE 7 64 bit and preferably the development kit (jdk). If on the server there is already
java 6 we could try to work with that but we need it to be 64 bit. OpenJDK will not work.

-Apache Tomcat 5.0+ (We tested with 7.0.52)

Testing the Kakadu Libraries and KDU executables


1. Extract the downloaded djatoka package into the desired location
2. Navigate to the extracted location and then to the bin directory

./compress.sh -i ../etc/test.jpg -o ../etc/test.jp2

./extract.sh -i ../etc/test.jp2 -o ../etc/test-size1.jpg -l 1

Verify that ../etc/test-size1.jpg exists and can be opened using an image viewer.

ls -l ../etc/test-size1.jpg

You may need to make the above sh scripts executable by doing the following:

chmod +x compress.sh
chmod +x extract.sh

It is essential that both scripts execute successfully for djatoka to work.

Installing in tomcat and running:


Scenario 1, install on a server with 1 instance of apache tomcat that starts on system start up
with an init.d script

1- cp ../dist/adore-djatoka.war [Tomcat]/webapps/
2- Edit /etc/init.d/tomcat7 so that it includes the djatoka environment variables script
from [djatoka-installation-package]/bin

Add this line to catalina_sh method


. /home/elie/adore_djatoka_1.1/bin/env.sh
Also change the following variables in env.sh to:
LAUNCHDIR=/home/elie/adore-djatoka-1.1/bin
DJATOKA_HOME=/home/elie/adore-djatoka-1.1

3- sudo /etc/init.d/tomcat7 restart

In a browser, open 'http://<host>:<port>/adore-djatoka/'. Verify that the BaseURL is


correct, and click the 'Update Image' button. This will download the an LoC American
Memory Image from
'http://memory.loc.gov/gmd/gmd433/g4330/g4330/np000066.jp2' and extract a 500 x
500 region from the JP2 file and return a JPG version on the image in the response.

Scenario 2, install on a server with multiple instances of tomcat and use one of these instances
just for djatoka.

1- cp ../dist/adore-djatoka.war [Tomcat]/webapps/
2- Make sure CATALINA_HOME & CATALINA_BASE environment variable are correctly set
to the desired instance of tomcat.
3- Navigate to [djatoka-installation-package]/bin and:
./tomcat.sh start
Ensure that temp directory exists in CATALINA_BASE

Windows Prerequisites:
-Oracle Java SE 7 32 bit and preferably the development kit (jdk). If on the server there is already
java 6 we could try to work with that but we need it to be 32 bit. OpenJDK will not work.

-Apache Tomcat 5.0+ (We tested with 8.0.14)

Setting and ensuring environment variables


1. Check that java.exe is in your PATH (e.g. java -version) and that you are using an Oracle
JVM. If this doesn't work, you'll need to add %JAVA_HOME%/bin to your path.

2. Set/Verify the follow environment variables:

JAVA_HOME Required: Must point at your Java Development Kit installation.

e.g. set JAVA_HOME=C:\Documents and Settings\208183\java

DJATOKA_HOME Required: Must point at your djatoka installation.

e.g. set DJATOKA_HOME=C:\Documents and Settings\208183\adore-djatoka-1.1


3. KAKADU_HOME Required: Must point at your Kakadu installation. Also, you'll need to
add KAKADU_HOME to your system PATH variable.

e.g. set KAKADU_HOME=C:\Documents and Settings\208183\adore-djatoka-


1.1\bin\Win32

e.g. set PATH=%PATH%;%KAKADU_HOME%

4. CATALINA_HOME Required: Must point at your Tomcat installation.

e.g. set CATALINA_HOME=C:\Documents and Settings\208183\tomcat

Testing the Kakadu Libraries and KDU executables


Navigate to DJATOKA_HOME/bin

compress.bat -i ..\etc\test.jpg -o ..\etc\test.jp2

extract.bat -i ..\etc\test.jp2 -o ..\etc\test-size1.jpg -l 1

Verify that ..\etc\test-size1.jpg exists and can be opened using an image viewer.

dir ..\etc\test-size1.jpg

It is essential that both scripts execute successfully for djatoka to work.

Installing in tomcat and running:


Scenario 1, install on a server with multiple instances of tomcat and use one of these instances
just for djatoka.

1- copy ../dist/adore-djatoka.war [Tomcat]/webapps/


2- Navigate to DJATOKA_HOME /bin and run:
tomcat.bat

In a browser, open 'http://localhost:8080/adore-djatoka/'. Verify that the BaseURL is


correct, and click the 'Update Image' button. This will download the an LoC American
Memory Image from
'http://memory.loc.gov/gmd/gmd433/g4330/g4330/np000066.jp2' and extract a 500 x
500 region from the JP2 file and return a JPG version on the image in the response.

Вам также может понравиться