Before Tomcat is installed the Java Development Kit must be installed. To install JDK issue the following command.
sudo aptitude install openjdk-6-jdk
In this example I have a /abi sub directory and issue the change directory command to make it the working sub directory.
Now place Apache Tomcat on the server.
Extract the zip by using the Webmin interface. If you do not have the Webmin interface available you can issue the following command to extract the zip.
sudo tar -xvf apache-tomcat-7.0.14.tar.gz
Drill down to the /abi/apache-tomcat-7.0.14/conf sub directory. Edit the tomcat-users.xmxl file. Uncomment the roles section. Apache sends this configuration commented so the roles are never executed unless this modification is made.
Include a line to identify the role as indicated below.
Next insert a line that identifies the user as indicated in the entry below.
<user username="arch" password="tomcat" roles="manager-gui"/>
Move the newly created Tomcat to its permanent home by issuing the following command.
mv /abi/apache-tomcat-7.0.14 /usr/share/tomcat
Now the command to start the Tomcat server needs to be issued via the command below.
Conversely to shut down Tomcat issue the following command.
Now issue the following command to start the Tomcat Manager GUI.
You should now see the GUI and proceed to deploy any wars you may have. Additionally scripts may be created to automate Tomcat startup shutdown and populating the webapps sub directory with war files.
This article was authored by Mr. Arch Brooks, Software Engineer for Brooks Computing Systems LLC.