1273
|
1 # Installing digilib
|
|
2
|
|
3 To run digilib you need:
|
|
4
|
1658
|
5 * [Java JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (7 or higher)
|
1273
|
6 * a Servlet Container like [Tomcat](http://tomcat.apache.org/) (version 7 or
|
1658
|
7 later) or [Jetty](http://www.eclipse.org/jetty/) (version 8 or later)
|
1273
|
8 * the digilib web application as a WAR file or application directory
|
|
9
|
1658
|
10 ## Start the Servlet Container
|
1273
|
11
|
|
12 Install and run the Servlet Container of your choice:
|
|
13 [Tomcat](http://tomcat.apache.org/tomcat-7.0-doc/setup.html) or
|
|
14 [Jetty](http://wiki.eclipse.org/Jetty/Howto/Run_Jetty).
|
|
15
|
1658
|
16 When the Servlet Container runs you should be able to access the start page on
|
1273
|
17 <http://localhost:8080/>
|
|
18
|
1658
|
19 ## Deploy via WAR file or web application directory?
|
|
20
|
|
21 A web application can be deployed either as a WAR file or a web application directory (aka "exploded web application").
|
|
22
|
|
23 The advantage of the WAR file is that it is easy to handle because it is just one file.
|
|
24
|
|
25 The disadvantage of the WAR file is that it is not easy to change the [digilib configuration](digilib-config.html)
|
|
26 file or any of the HTML or Javascript files because they are hidden in the WAR file.
|
|
27
|
|
28 It is possible to unpack a WAR file into a web application directory to be able to change its contents (see below).
|
|
29
|
|
30 ## Where to get a WAR file or web application directory?
|
|
31
|
|
32 The preferred way is to [build your own](build-maven.html) WAR file or web application directory using the digilib sources.
|
|
33 In this way you can change the configuration files in the source directory and create a new WAR file
|
|
34 or web application directory any time you need.
|
|
35 Also you get the chance to always use the latest digilib version by updating the source code.
|
|
36
|
|
37 You can also download a digilib WAR file with a default configuration from the
|
|
38 [SourceForge download page](https://sourceforge.net/projects/digilib/files/)
|
|
39 or the latest digilib build from the
|
|
40 [daily build page](https://it-dev.mpiwg-berlin.mpg.de/downloads/digilib/daily-build/).
|
|
41 The default configuration will only show a set of sample images. If you want to show your own images
|
|
42 you will need to change the [digilib configuration](digilib-config.html) to point to your image directories.
|
|
43
|
|
44
|
1273
|
45 ## Install a digilib WAR file
|
|
46
|
1658
|
47 1. Get a digilib WAR file.
|
1273
|
48 2. Rename the WAR file to `digilib.war`.
|
1658
|
49 3. Deploy the WAR file by copying it into the `webapps` directory of your
|
1273
|
50 Servlet Container.
|
|
51 4. Restart your Servlet Container (this may not be necessary).
|
|
52 5. Access your digilib instance at <http://localhost:8080/digilib/digilib.html>.
|
|
53
|
|
54 You will now be able to see the sample images provided with the digilib
|
1658
|
55 installation in the default configuration yor your own images
|
|
56 if you have updated the [configuration](digilib-config.html).
|
1273
|
57
|
1658
|
58 In digilib you can view images by providing the directory and file
|
|
59 name as the `fn` parameter to `digilib.html`, e.g. if your file is called
|
|
60 `ruler.jpg` and it is in the base directory you can now access the URL
|
|
61
|
|
62 <http://localhost:8080/digilib/digilib.html?fn=ruler>
|
|
63
|
|
64 Read more about the layout of image files and directories
|
|
65 [here](image-directories.html).
|
|
66
|
1273
|
67
|
|
68 ## Install digilib as a web application directory
|
|
69
|
1658
|
70 1. Get a digilib web application directory.
|
|
71 2. Rename the WAR file to `digilib.war`.
|
|
72 3. Deploy the WAR file by copying it into the `webapps` directory of your
|
|
73 Servlet Container.
|
|
74 4. Restart your Servlet Container (this may not be necessary).
|
|
75 5. Access your digilib instance at <http://localhost:8080/digilib/digilib.html>
|
|
76
|
|
77 You will now be able to see the sample images provided with the digilib
|
|
78 installation in the default configuration yor your own images
|
|
79 if you have updated the [configuration](digilib-config.html).
|
|
80
|
|
81 In digilib you can view images by providing the directory and file
|
|
82 name as the `fn` parameter to `digilib.html`, e.g. if your file is called
|
|
83 `ruler.jpg` and it is in the base directory you can now access the URL
|
|
84
|
|
85 <http://localhost:8080/digilib/digilib.html?fn=ruler>
|
|
86
|
|
87 Read more about the layout of image files and directories
|
|
88 [here](image-directories.html).
|
|
89
|
|
90
|
|
91 ## Unpack a WAR file into a web application directory
|
|
92
|
|
93 You can unpack the WAR file into a directory called `digilib` using
|
1273
|
94 an unzip tool or the `jar -xf` Java command.
|
|
95
|
|
96 Alternatively you can look into the `webapps` directory of your Servlet
|
|
97 Container (when its not running) to see if it created an unpacked web
|
1658
|
98 application directory called `digilib`. Then:
|
1273
|
99
|
|
100 1. Make sure that your Servlet Container is not running and remove any
|
|
101 `digilib.war` files from the `webapps` directory.
|
|
102 2. Copy your `digilib` directory into the `webapps` directory of the
|
|
103 Servlet Container.
|