Versions Compared

Key

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

...

  1. Code Block
    bash ${REPO_HOME}/etc/finish-install.sh \
    -f firstname \
    -l lastname \
    -m admin@ei.edu \
    USERNAME PASSWORD https://localhost:8443
  2. Confirm it is running by visiting the admin page (login with USERNAME and PASSWORD):
    Code Block
    https://localhost:8443/repository/admin

...


Upgrade

This is the procedure to upgrade an existing repository instance to a new release of the software. All existing configurations, data, and user accounts are preserved. However, if the upgrade includes ontology changes there may also be an extra procedure to transform the existing data to reconcile it with ontology changes. Always consult the release notes.

...

  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/localhostunziplocalhost
    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.

...

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.

...

  1. Discover your machine's primary IP address and set the ADDR shell variable: (Note that this assumes eth0 is your primary network interface --use ifconfig -a to see them all)
    Code Block
    ADDR=`ifconfig eth0 \| perl \-ne 'print "$1\n" if m/\sinet addr\:(\d+\.\d+\.\d+\.\d+)\s/;'`
  2. Run these iptables commands to redirect all port 80 requests to port 8080.
    Code Block
    iptables \-t nat \-A OUTPUT \-d localhost \-p tcp \--dport 80 \-j REDIRECT \--to-ports 8080iptables \-t nat \-A OUTPUT \-d $ADDR \-p tcp \--dport 80 \-j REDIRECT \--to-ports 8080iptables \-t nat \-A PREROUTING \-d $ADDR \-p tcp \--dport 80 \-j REDIRECT \--to-ports 8080
  3. (If using SSL) Run these iptables commands to redirect all port 443 requests to port 8443.
    Code Block
    iptables \-t nat \-A OUTPUT \-d localhost \-p tcp \--dport 443 \-j REDIRECT \--to-ports 8443iptables \-t nat \-A OUTPUT \-d $ADDR \-p tcp \--dport 443 \-j REDIRECT \--to-ports 8443iptables \-t nat \-A PREROUTING \-d $ADDR \-p tcp \--dport 443 \-j REDIRECT \--to-ports 8443
  4. Save the rules in the canonical place to be reloaded on boot:
    Code Block
    iptables-save > /etc/iptables.rules
  5. Create a script to be run by the network startup infrastructure that will reload the iptables whenever the network is configured on:
    Code Block
    cat << EOF > /etc/network/if\-pre-up.d/iptablesload\
    #\!/bin/shiptablessh
    iptables-restore < /etc/iptables.rulesexit 0EOFrules
    exit 0
    EOF
  6. Test by accessing your server both locally and remotely by the port-80 URL. Then reboot the machine and try it again to be sure the iptables commands are run correctly on boot.

...

  1. Run this iptables command to redirect all port 80 requests to port 8080.
    Code Block
    /sbin/iptables \-t nat \-I PREROUTING \-p tcp \--dport 80 \-j REDIRECT \--to-port 8080
  2. Save the rules in the canonical place to be reloaded on boot:
    Code Block
    /sbin/iptables-save
  3. Update the startup settings so iptables will run upon reboot:
    Code Block
    chkconfig \--level 35 iptables on
  4. Test by accessing your server both locally and remotely by the port-80 URL. Then reboot the machine and try it again to be sure the iptables commands are run correctly on boot.

...