SUNScholar/Prepare Ubuntu/S08
Revision as of 12:28, 4 August 2012 by Hgibson (talk | contribs) (→Step 8.3 Increase number of open files available)
Contents
Step 8. Setup the environment variables
Step 8.1 Java environment settings for Tomcat webapp server
To setup the environment variables for Tomcat java web applications, type the following:
nano /etc/default/tomcat6
Check the following for comparison:
# You may pass JVM startup parameters to Java here. If unset, the default # options (-Djava.awt.headless=true -Xmx128m) will be used. #JAVA_OPTS="-Djava.awt.headless=true -Xmx128m" JAVA_OPTS="-Djava.awt.headless=true -Xms1024m -Xmx2048m -XX:MaxPermSize=1024m"
Java environment settings used for SUNScholar
Your settings will depend on how much RAM you have available to assign to the Tomcat server. See graph below as well.
JAVA_OPTS="-Djava.awt.headless=true -Xmx8192m -Xms4096m -XX:PermSize=4096m -XX:MaxPermSize=8192m"
Graph of RAM memory usage on SUNScholar.
Step 8.2 Java environment settings for other java web applications
To setup the environment variables for other java applications (such as the Handle and SOLR servers), type the following:
nano /etc/environment
Copy and paste the following to the bottom of the file.
JAVA_HOME="/usr/lib/jvm/java-6-sun" JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -Xms512m"
Step 8.3 Increase number of open files available
Open the following file as follows:
nano /etc/security/limits.conf
Add the following to the bottom of the file:
* hard nofile 65536 * soft nofile 65536
Save the file. Make sure to check the files open parameter with the next computer reboot by typing the following:
ulimit -n
PREVIOUS
NEXT

