Page History
...
- This application requires Sun's JRE version 1.6, e.g. "Java HotSpot(TM) SE Runtime Environment".
- The repository is a pure Java webapp and ought to run on any Java Servlet container conforming to the 2.5 version of the specification. It has only been thoroughly tested on Apache Tomcat 6.0 and smoke-tested on Apache Tomcat 7.0, however.
- The supporting utility scripts and tools require a Unix environment such as MacOS or Linux. MS Windows is NOT supported.
- Aside from the Java Servlet environment, the webapp requires a separate "home" directory, located outside of the servlet container hierarchy, to which the container's JVM has read/write access.
...
- Unix-like operating system. This procedure is only valid for Unix variants like Linux, Solaris, MacOSX. To run some of the scripts you will need to have these commands installed:
bash
perl
curl
awk
(surely anything that calls itself unix must have awk)tr
(seriously, is tr missing? if you are running Gentoo, install an operating system)
- Sun's Java JDK 1.6.0.18 (though any 1.6 version ought to work just as well).
- Apache Tomcat web servlet container,*version 6.0 (version 7.0 should work but we haven't thoroughly tested; also works, but this guide refers to version 6.0), configured to run with the Java JDK in #2.
- Make sure you follow Tomcat installation and configuration instructions for the Tomcat version and Linux distribution you are using; before installing the eagle-i repository, Tomcat must be fully functional. You may want to test this by using Tomcat's manager app, which should be available at at http://localhost/manager/html/ - you will need to edit the file conf/tomcat-users.xml for defining a user and a role - see this guide: Apache Tomcat 6.0 Manager App HOW_TO
- Tomcat may be configured as a standalone web server, or be fronted by an Apache httpd server. In this guide we assume the former configuration. The latter should also work, but describing it is out of our scope.
- Tomcat must be configured to use SSL, see the quickstart section here: Apache Tomcat 6.0 SSL Configuration HOW-TO. Note that a production server will require a valid SSL certificate.
- Network configuration for Tomcat to respond on standard ports 80 and 443 is recommended. The procedure section below Run Tomcat on Port 80 and 443 details our preferred method. Other methods (e.g. using of Apache httpd) are possible but out of scope for this guide.
- See this See the Procedures section if using Ubuntu's tomcat6 package.
- It may be necessary to download Tomcat directly and install it manually if the version supplied by the host OS's package system is not usable. Don't hesitate to do this if it is expedient; Tomcat can run as a pure Java application in a single file hierarchy, so a manual download can work just as well (if not better) than the packaged version.
- Optional: Apache Derby RDBMS installed in your Tomcat servlet container.
- A copy of Derby is provided if you need to install it.
...
Code Block |
---|
move-resources \-s [https://qa.harvard.eagle-i.net:8443] \-u bert:ernie \ \-g [http://eagle-i.org/ont/repo/1.0/NG_Published] [https://localhost:8443] \ root:password [http://eagle-i.org/ont/repo/1.0/NG_Experimental] Moved 4694 data statements and 322 metadata statements. |
Anchor | ||||
---|---|---|---|---|
|
Procedure: Upgrading Packaged Tomcat
...
Finally, delete the entire ${CATALINA_HOME}/work
direcotry. Tomcat rebuilds it on startup anyway, but it can contain mistaken caches that do not get updated. Now you can start up Tomcat as usual.
Anchor | ||||
---|---|---|---|---|
|
See also: The Procedure to redirect Port 80 so your URLs are simplified.
...
- Shut down tomcat. This is major surgery, and tomcats don't like to be vivisected no matter how much more satisfying you may find it.
- Disable Java Security -- alternately, you could try to configure all the authorization grants to give the repository webapp access to the filesystem and property resources it needs, but I found it much easier to just disable java security. DO NOT RUN THE TOMCAT PROCESS AS ROOT if you do this, but you should not be running it as root in any case. That's just insane.
- Edit the file
/etc/init.d/tomcat6
and change the following variable to look like this:Code Block TOMCAT6_SECURITY=no
- Edit the file
- Install Derby jars: ONLY IF DERBY IS NOT ALREADY INSTALLED IN THE COMMON AREA OF YOUR TOMCAT. If another webapp is already using Derby, they should share that version.
- Find the Derby jars in the
lib/
subdirectory under where you installed thecreate-user.sh
script. - Copy them to the Tomcat common library directory:
Code Block cp ${REPO-ZIP-DIR}/lib/derby\* /usr/share/tomcat6/lib/
- Find the Derby jars in the
- Install the webapp: First, get rid of any existing root webapp, then copy in the webapp (
ROOT.war
file from your installation kit) and be sure it is readable by the tomcat6 user:Code Block rm /var/lib/tomcat6/webapps/ROOT*cp ROOT.war /var/lib/tomcat6/webapps/ROOT.war
- Install cached webapp context: This is VERY IMPORTANT, and the Tomcat docs does not even mention it, but without it your server will be mysteriously broken. The file
/etc/tomcat6/Catalina/localhost/ROOT.xml
must be a copy of your app'scontext.xml
. Redo this command after installing every newROOT.war
:Code Block mkdir \-p /etc/tomcat6/Catalina/localhost unzip \-p /var/lib/tomcat6/webapps/ROOT.war META-INF/context.xml > /etc/tomcat6/Catalina/localhost/ROOT.xml
- Add System Properties: Be sure you have added system properties to the file
/etc/tomcat6/catalina.properties
e.g.
...of course, the value of these properties will be your Repository Home Directory path.Code Block org.eaglei.repository.home = /opt/eaglei/repoderby.system.home = /opt/eaglei/repo
- Start up Tomcat:
Code Block sudo /etc/init.d/tomcat6 start
- Troubleshooting: If there are problems, check the following places for logs (because packaged apps make everything so much easier):
/var/log/daemon.log
- really dire tomcat problems and stdout/stderr go to syslog/var/log/tomcat6/*
- normal catalina logging${REPOSITORY_HOME}/logs/repository.log
- default repo log file in release 1.1; under 1.0 the filename wasdefault.log
.
Anchor | ||||
---|---|---|---|---|
|
We want the repository (and other Web tools) to have a simple URL, without the ugly port number after the hostname, e.g. NOT http://dev.harvard.eagle-i.net:8080/...
, but just http://dev.harvard.eagle-i.net/ (because, really, that's already enough to remmeber.) This procedure uses IP port redirection to let your Tomcat server appear to be running on the canonical HTTP port, which is 80. It is the simplest and safest method to accomplish this under Linux.
...
Overview
Content Tools