How to Start Tomcat on Linux
Are you developing Java applications with Tomcat? Do you want to run the server on Linux? It's not that hard. Once you have installed Tomcat, you will need to start the server. Read on to find out how.
Instructions
-
-
1
Open a terminal.
-
2
Navigate with the "cd" command to the directory that Tomcat is located in. If you don't know where Tomcat is, then you can do a "Find." Just type this:
sudo find / -name *tomcat*
This will return a list of files named Tomcat. One of the items in the list should be the directory location.
-
-
3
Once you are in the top level directory of Tomcat, you need to move to the bin directory. Type an "ls" command to make sure there is a bin directory. If not, then you are in the wrong place. Then type "cd bin" (without quotes).
-
4
In Tomcat's bin directory, type "./startup.sh" (without the quotes). This will execute the script that starts Tomcat.
-
5
If you get an error for JAVA_HOME or JRE_HOME not being defined, then you need to add the JAVA_HOME variable to your environment.
Just type:
export JAVA_HOME=/home/seedling/app/jre1.5/
Obviously the directory will be different on your system, but it should be the top-level directory of your Java installation.
-
6
If you received the error in Step 4, then type "./startup.sh" after you complete Step 5. Tomcat should start up with no problem.
-
7
Confirm that you see lines like this:
Using CATALINA_BASE: /home/seedling/app/tomcat6
Using CATALINA_HOME: /home/seedling/app/tomcat6
Using CATALINA_TMPDIR: /home/seedling/app/tomcat6/temp
Using JRE_HOME: /home/seedling/app/jre1.5/
This means that Tomcat started successfully.
-
1