2.4.
Ubuntu/Debian
Up one level
Installing Java
Run the following command to install sun-java6-jdk packages:
sudo apt-get install sun-java6-jdk
The system will prompt you to accept the DJK license, reply yes. You can test the installed java version in your system executing the following command:
$ java -version java version "1.6.0_06" Java(TM) SE Runtime Environment, Standard Edition (build 1.6.0_06-b02) Java HotSpot(TM) Client VM (build 1.6.0_06-b22, mixed mode, sharing)
Installing tomcat5
Run the following command to install tomcat5.5 or tomcat6 packages:
$ sudo apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps
or for tomcat6
$ sudo apt-get install tomcat6 tomcat6-admin tomcat6-webapps
During tomcat installation the system will install automatically an open version of Java as the default system java. In order to make Sun's java the default one run:
sudo update-alternatives --config java
Edit /etc/default/tomcat5.5, 6 to:
- define JAVA_HOME, e.g.
JAVA_HOME=/usr/lib/jvm/java-6-sun
- replace line TOMCAT_SECURITY=yes with the following:
TOMCAT_SECURITY=no
- configure JAVA_OPTS to
JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -Xms128m -XX:MaxPermSize=512m -jvm server"
Edit /var/lib/tomcat5.5/conf/tomcat-users.xml file to add a manager role, e.g.
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> ... <role rolename="manager"/> <role username="manager" password="xxxxxx" roles="manager"/> ... </tomcat-users>
You need to restart tomcat now:
sudo /etc/init.d/tomcat5.5 restart
At this point refer to the GRIA documentation e.g. GRIA user guide, Deploying the Services to Tomcat.
NOTE: the default port for the tomcat server, for Ubuntu releases up to 8.10, is on 8180 NOT 8080, e.g. http://<servername>:8180
You can change the port number to 8080 if you want by editing /var/lib/tomcat5.5/conf/server.xml and changing the connector port="8180" settings.
Setting the system clock
In order to provide some synchronisation between the clocks on machines that the various GRIA packages are installed on, it is recommended that you run an NTP client service that will synchronise your system with an Internet time server. On Debian and Ubuntu systems, this can be done using the ntpdate or ntp packages, e.g. sudo apt-get install ntp.
