Apache Tomcat |
Server Training - Web Server |
Tomcat Apache Tomcat uses the Java Servlet and JavaServer Pages technologies. Java Servlet technology enables a mechanism for extending the functionality of a Web Server with Java. JavaServer Pages (JSP) technology provides a fast way to create dynamic for a Web Server. This also explains how to install Ant a Java-based build tool.
Installation This can be very frustrating as you will want to find the correct files and if this is a first time venture into Java it is hard to understand what is what. You need two files to download to the /root directory of your Linux box. The two files are jre-6ux and jdk-6ux, the actual versions are listed below but the update number may have changed by the time you read this. Here are the versions used in the example, be sure to change version numbers if you have downloaded different versions. Install as the root user. # mkdir /usr/java # cd /usr/java 2. Download apache-ant apache-tomcat from http://www.apache.org
# cd /usr/share # tar -xzf apache-tomcat-6.0.16.tar.gz # tar -xzf apache-ant-1.7.1-bin.tar.gz # ln -s /usr/share/apache-ant-1.7.1/bin/ant /usr/bin/ # cd /usr/share/apache-tomcat-6.0.16/bin # vi catalina.sh # cd /usr/share/apache-tomcat-6.0.16/bin # ./startup.sh After it has started check your log files to verify there are no errors. If there are errors document them and fix them before moving forward. # less /usr/share/apache-tomcat-6.0.16/logs/catalina.out Once you have fixed all errors and started again with no errors Tomcat is fully functional. # ln -s /usr/share/apache-tomcat-6.0.16/bin/startup.sh /usr/bin/tomcat Running Tomcat In order to run tomcat you must execute the scripts found in the bin directory of the tomcat home. $CATALINA_HOME/bin/startup.sh
Tomcat runs on port 8080. So to test your installation go to http://localhost:8080/
|