Install Tomcat - OtagoPolytechnic/opp-user GitHub Wiki
Run the follow command to install Tomcat7.
sudo apt-get install tomcat7
After the installation of the Tomcat 7 has complete, you need to make a change of the Java option that Tomcat uses when it starts. Open the Tomcat7 parameters file.
sudo vi /etc/default/tomcat7
Find the JAVA_OPTS line and replace it with the following.
JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Xmx512m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC"
Now restart the Tomcat7 with following command.
sudo service tomcat7 restart
Run the following command to install the Additional Package for tomcat7 as you will need it for the web management interface, documentation, or examples.
sudo apt-get install tomcat7-docs tomcat7-admin tomcat7-examples
In the order to use the Tomcat web management web-app, you need to editing the following file.
sudo vi /etc/tomcat7/tomcat-users.xml
In this file, find the <tomcat_users> line and under that line add the following command.
<user username="admin" password="password" roles="manager-gui,admin-gui"/>
Save and exit fro that file and restart the Tomcat7 again. Access the web interface. Open the web browser and go to cas.op-bit.nz:8080 and you will see It works! This is to make sure that Tomcat is running.
More information about configuration of Tomcat7 to run on port 8443(https) as CAS SSO is require here.