# Instructions for installing JDK and Tomcat prior to the Oxford RadioNet Workshop December 2006 # # These instructions read like unix shell scripts, but require manual intervention. The best way # to use them is to copy/paste the commands into a Unix shell, and add the manual edits as required. # # Everything will be done as user 'astrogrid' unless otherwise stated. You will need root access for # one of the steps below, or for two of them if you change the install directory. # # # Add the user astrogrid as root and change to be that user adduser astrogrid su - astrogrid # alternatively, open a new shell as user astrogrid and continue in that shell # # Set the target hostname. # For a test system, with all of the services on the same machine, this can be set to localhost. # For a live system, this should be set to the full public DNS name of the host machine. export ASTROGRID_HOSTNAME=`hostname -f` # # Set ASTROGRID_HOME path. # For a test system, this can be located in the users home directory. export ASTROGRID_HOME=/home/astrogrid # For a live system, we recomend using a separate directory for the AstroGrid services. #export ASTROGRID_HOME=/var/local/astrogrid # # Create the top level directory. # If you have already added the user 'astrogrid', this folder will already exist so no need to add it. # ** May need to be root to create the directory. #su # mkdir $ASTROGRID_HOME # chmod a+rwx $ASTROGRID_HOME #exit # # Create downloads directory mkdir $ASTROGRID_HOME/downloads # # -------- -------- -------- -------- # Install Sun JDK. # ** Need to be root to run rpm. # ** Ignore this section if you already have a suitable JDK installed. # ** If you are using an existing JDK, make sure JAVA_HOME points to the right location. # # # Set the Java RPM version. export JAVA_DISTRO=jdk-1_5_0_08-linux-i586.rpm # # Get the target java JDK. # Need to post latest JDK to our repo. pushd $ASTROGRID_HOME/downloads wget http://www.astrogrid.org/maven/java--downloads/${JAVA_DISTRO} popd # # Install the JDK (need to be root). su rpm -i ${ASTROGRID_HOME}/downloads/${JAVA_DISTRO} exit # # Set JAVA_HOME environment variable. export JAVA_HOME=/usr/java/jdk1.5.0_08/ # # Enable port 8080 in Fedora firewall (iptables). # vi /etc/sysconfig/iptables # -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT # # # -------- -------- -------- -------- # Install Tomcat. # # Set the Tomcat version. export TOMCAT_DISTRO=apache-tomcat-5.5.20 # # Get the current Tomcat distro and admin package. pushd $ASTROGRID_HOME/downloads wget http://www.astrogrid.org/maven/tomcat/zips/${TOMCAT_DISTRO}.zip wget http://www.astrogrid.org/maven/tomcat/zips/${TOMCAT_DISTRO}-admin.zip popd # # Unpack the Tomcat distro and admin package. pushd $ASTROGRID_HOME unzip $ASTROGRID_HOME/downloads/${TOMCAT_DISTRO}.zip unzip $ASTROGRID_HOME/downloads/${TOMCAT_DISTRO}-admin.zip popd # # Set CATALINA_HOME environment variable. export CATALINA_HOME=$ASTROGRID_HOME/${TOMCAT_DISTRO} # # Set the CATALINA opts. # For high traffic or large volume system, you will need to increase the memory the JVM is allowed to use. #export CATALINA_OPTS="-Xmx512M" # # Set the permissions on the Tomcat control scripts. chmod a+x $CATALINA_HOME/bin/*.sh # # Add the wokshop account and roles. # *separate elements are not required in Tomcat 5.5 vi $CATALINA_HOME/conf/tomcat-users.xml + # # Start Tomcat. $CATALINA_HOME/bin/startup.sh # # Check Tomcat running. # http://${ASTROGRID_HOSTNAME}:8080/ # # Check Tomcat admin login (workshop, qwerty) # http://${ASTROGRID_HOSTNAME}:8080/admin # # Check Tomcat manager login (workshop, qwerty) # http://${ASTROGRID_HOSTNAME}:8080/manager/html