Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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)
  2. Sun's Java JDK 1.6.0.18 (though any 1.6 version ought to work just as well).
  3. Apache Tomcat web servlet container,*version 6.0 (version 7.0 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 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 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.

...

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.

...

Procedures

...


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. Anchorprocedure:ubuntuprocedure:ubuntu

Procedure: Installing Repo on Ubuntu 10's packaged Tomcat6

See also: The Procedure to redirect Port 80 so your URLs are simplified.

...

  1. 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.
  2. 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.
    1. Edit the file /etc/init.d/tomcat6 and change the following variable to look like this:
      Code Block
      TOMCAT6_SECURITY=no
  3. 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.
    1. Find the Derby jars in the lib/ subdirectory under where you installed the create-user.sh script.
    2. Copy them to the Tomcat common library directory:
      Code Block
      cp ${REPO-ZIP-DIR}/lib/derby\* /usr/share/tomcat6/lib/
  4. 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
  5. 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's context.xml. Redo this command after installing every new ROOT.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
  6. Add System Properties: Be sure you have added system properties to the file /etc/tomcat6/catalina.properties e.g.
    Code Block
    org.eaglei.repository.home = /opt/eaglei/repoderby.system.home = /opt/eaglei/repo
    ...of course, the value of these properties will be your Repository Home Directory path.
  7. Start up Tomcat:
    Code Block
    sudo /etc/init.d/tomcat6 start
  8. 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 was default.log.

...

Procedure: Run Tomcat on Port 80 (and 443)

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.

...