All of the fields must be filled.
You cannot swap a section with a page.
You must first select a group before adding a user to it.

Installing tomcat is actually very quick and easy. Assuming you already have the JDK installed, this will only take a few minutes. In my years of experience as a sysadmin I've had to install tomcat a billion times (well maybe not that many, but quite a few) and I actually have a script which does it for me. In this article, I will go over the few easy steps to get tomcat up and running.
First of all, you need to download tomcat. The software is already compiled and ready to go on all major distros. At the time that I am writing this article, version 6.0.20 is the latest, but you may consult the download page for newer versions if they exist.
| wget http://apache.sunsite.ualberta.ca/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz |
Choosing the extraction directy is really up to how you configure your box. In this case, I will extract it to /etc/ and then rename the long directory name to /etc/tomcat for simplicity.
|
cp apache-tomcat-6.0.20.tar.gz /etc/
tar xzvf apache-tomcat-6.0.20.tar.gz
rm apache-tomcat-6.0.20.tar.gz
mv apache-tomcat-6.0.20/ tomcat
|
Next, we need to configure tomcat's port. By default it is 8080, but in the tomcat/conf directory, there is a file called server.xml which allows you to specify which port and which IP tomcat runs on. By default it will listen on 0.0.0.0, but you can add the attribute address to the Connector node for a specific address.
|
<Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> |
We're almost done, now we want to make sure that we're using the proper JDK when starting tomcat, you may either set this in the current user's profile, in the /etc/profile or simply modify the tomcat/bin/catalina.sh and add this line (where the value is the location of the JDK's home directory):
| export JAVA_HOME=/usr/java/jdk1.6.0_14 |
Lastly, we want to link that script to our etc/init.d to keep it inline with other configurations.
|
cd /etc/init.d
ln -s /etc/tomcat/bin/catalina.sh tomcat
|
Afterwards, you can start or stop tomcat with /etc/init.d/tomcat start|stop and if you want it to start automatically when your system boots, you can add a link to your rc#.d where # is the runlevel. If you don't know what your runlevel is, simply type runlevel and it will be indicated.
|
cd /etc/rc3.d
ln -s /etc/init.d/tomcat S99Tomcat
|
You may now start your tomcat and if you try to browse this box's url (or localhost if you have that access) you should see the tomcat welcome page. Remember to put the port that you specified, so if you are navigating on localhost and left tomcat on port 8080, you should be able to point your browser to http://localhost:8080
For additional support, you may want to use a ProxyPass in apache to mask the port, which is explained in this article.
Enjoy!