...
- Move the initial content and archive directories
- mv /ucd/pkg/apache-tomcat-5.5.12/sakai/content /var/sakai/
- mv /ucd/pkg/apache-tomcat-5.5.12/sakai/archive /var/sakai/
- chown -R sakai.sakai /var/sakai
- Remove the soft link /ucd/opt/tomcat
- rm /ucd/opt/tomcat
- Adjust sakai.properties to match the new archive and content location. Edit the following lines:
- sakai.properties is located at: /ucd/pkg/apache-tomcat-5.5.12/sakai/sakai.properties
No Format From: storagePath@org.sakaiproject.service.legacy.archive.ArchiveService = ${sakai.home}/archive/ bodyPath@org.sakaiproject.service.legacy.content.ContentHostingService = ${sakai.home}/content/ To: storagePath@org.sakaiproject.service.legacy.archive.ArchiveService = /var/sakai/archive/ bodyPath@org.sakaiproject.service.legacy.content.ContentHostingService = /var/sakai/content/
- sakai.properties is located at: /ucd/pkg/apache-tomcat-5.5.12/sakai/sakai.properties
- Rename apache-tomcat-5.5.12 to tomcat1 apache-tomcat-5.5.12-tc1
- mv apache-tomcat-5.5.12 tomcat1
- Copy tomcat1 to tomcat2
- cp -R tomcat1 tomcat2
- Adjust both tomcat1's and tomcat2
- apache-tomcat-5.5.12-tc1
- Copy apache-tomcat-5.5.12-tc1 to apache-tomcat-5.5.12-tc2
- cp -R apache-tomcat-5.5.12-tc1 apache-tomcat-5.5.12-tc2
- Adjust both apache-tomcat-5.5.12-tc1's and apache-tomcat-5.5.12-tc2's server.xml so that we don't have port conflicts
- server.xml is located at:
- /ucd/pkg/tomcat1apache-tomcat-5.5.12-tc1/conf/server.xml and /ucd/pkg/tomcat2apache-tomcat-5.5.12-tc2/conf/server.xml
- Make the following port number changes for tomcat1apache-tomcat-5.5.12-tc1:
No Format 8005 to 8105 8080 to 8180 8443 to 8543 8009 to 8109
- Make the following port number changes for tomcat2apache-tomcat-5.5.12-tc2:
No Format 8005 to 8205 8080 to 8280 8443 to 8643 8009 to 8209
- Change the serverId in sakai.properties for both tomcat1 and tomcat2 apache-tomcat-5.5.12-tc1 and apache-tomcat-5.5.12-tc2
- Edit /ucd/pkg/tomcat1apache-tomcat-5.5.12-tc1/sakai/sakai.properties
No Format From: serverId=stubing To: serverId=stubing-tomcat1stubing1
- Edit /ucd/pkg/tomcat2apache-tomcat-5.5.12-tc2/sakai/sakai.properties
No Format From: serverId=stubing To: serverId=stubing-tomcat2stubing2
- Edit /ucd/pkg/tomcat1apache-tomcat-5.5.12-tc1/sakai/sakai.properties
- Adjust serverUrl in /ucd/pkg/apache-tomcat-5.5.12-tc1/sakai/sakai.properties and /ucd/pkg/apache-tomcat-5.5.12-tc2/sakai/sakai.properties
No Format serverUrl=http://sakai2.ucdavis.edu:8080 Note: Adjust the above port (8080) for http, https, or port 80 forwarding, etc.
- We only run James on tomcat1apache-tomcat-5.5.12-tc1, so we need to disable it on tomcat2 apache-tomcat-5.5.12-tc2
- Change the following line in: /ucd/pkg/tomcat2apache-tomcat-5.5.12-tc2/sakai/sakai.properties
No Format From: smtp.enabled = true To: smtp.enabled = false
- Change the following line in: /ucd/pkg/tomcat2apache-tomcat-5.5.12-tc2/sakai/sakai.properties
- Make sure that you adjust JAVA_OPTS so that both JVMs have enough memory. In our case this will be:
No Format setenv JAVA_OPTS "-serverd64 -Xmx1500m -Xms1500m -Xmx1500m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+UseAdaptiveSizePolicy -XX:PermSizeNewSize=16m256m -XX:MaxPermSize=128m200m -XX:PermSize=64m -verboseXX:gcMaxTenuringThreshold=3 -XX:+PrintGCDetailsCMSInitiatingOccupancyFraction=75 -XX:+PrintGCTimeStampsMinHeapFreeRatio=18"
- When starting either tomcat instance, we have to make sure that we use specific CATALINA_HOME settings for each instance.
- Starting tomcat1 Note that we set JAVA_HOME to Java v5 to run it in 64bit
Starting tomcat2No Format cd JAVA_HOME=/ucd/pkg/tomcat1/bin setenvopt/java5 export JAVA_HOME CATALINA_HOME =/ucd/pkg/tomcat1 ; ./shutdown.sh ; ./ startup.sh ; tail -f ../logs/catalina.out
No Format cd /ucd/pkg/tomcat2/bin setenvapache-tomcat-5.5.12-tc1 export CATALINA_HOME /ucd/pkg/apache-tomcat-5.5.12-tc1/bin/startup.sh CATALINA_HOME=/ucd/pkg/apache-tomcat-5.5.12-tc2 export CATALINA_HOME /ucd/pkg/tomcat2 ; ./shutdown.sh ; ./ startup.sh ; tail -f ../logs/catalina.outapache-tomcat-5.5.12-tc2/bin/startup.sh
- Starting tomcat1 Note that we set JAVA_HOME to Java v5 to run it in 64bit
- Adjust "iptables" to allow traffic for both port 8180 as well as 8280
- Adjust port-forwarding from "80 --> 8080" to "80 --> 8180" if necessary
- Maybe restrict access to 8180 and 8280 only form the load balancer
- Make sure that you adjust /etc/rc.d/rc.local to not just start one tomcat