Versions Compared

Key

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

...

The script should cleanly replace an existing Tomcat 6 installation with Tomcat 7, generating a new server.xml in the process. If you are already on Tomcat 7 (or newer), the script will exit and do nothing.

Use setenv.sh to fix "java.lang.OutOfMemoryError: PermGen space"

Depending on the version of Java you are running, you may need to create a file called setenv.sh in Tomcat's bin/ folder to increase the PermGen size given to it. If you are suddenly unable to access SHRINE and catalina.out logs multiple OutOfMemoryError messages, you should create setenv.sh, make sure it is owned by the same user that runs SHRINE, and make sure it is executable:

Code Block
titlecreating setenv.sh
$ cd /opt/shrine/tomcat/bin
$ vi setenv.sh
$ sudo chown shrine:shrine setenv.sh
$ sudo chmod 755 setenv.sh

The contents of setenv.sh should look like this:

Code Block
languagebash
titlesetenv.sh contents
export CATALINA_OPTS=" -XX:MaxPermSize=256m "

Restart SHRINE to make the changes take effect.

Deploy New shrine.war

Next, we will retrieve the new SHRINE webapp from the HMS Sonatype Nexus server at http://repo.open.med.harvard.edu/nexus/content/groups/public/net/shrine/shrine-war/. Choose the version that you are upgrading to (for example, 1.19.2) and navigate to that folder. From there, download the appropriate shrine-war-[VERSION].war file to the webapps directory on the SHRINE server and rename it to shrine.war.

...