Install Tomcat on Linux

To install Tomcat on Windows on Linux:

  1. Go to the following URL:
  2. Select the tar.gz download.
    The apache-tomcat-6.0.x.tar.gz file is downloaded.
  3. Untar the file to the /opt directory; for example:
    [root@t19c6264 opt]# tar xvfz /home/userx/apache-tomcat-6.0.37.tar.gz
  4. Open the %TomcatDir%/conf/server.xml file (for example, /opt/tomcat6/conf/server.xml).
  5. Set the port attribute to a port that is not currently used.
    For example:
    <Connector port="8090" protocol="HTTP/1.1"
               redirectPort="8443" />
    Note: By default, port 8080 is used, but this may conflict with the GlassFish server port.
  6. Save and close the %TomcatDir%/conf/server.xml file.
  7. Create the file in %TomcatDir%/bin/ and add the following lines:
    export JAVA_OPTS
    export JRE_HOME
  8. To make the file executable, enter:
    chmod a+x <filename>
    For example:
    chmod a+x /opt/tomcat6/bin/
  9. Replace <JRE_Location> with the path to the Java installation on your machine:
    For example:
  10. Save and close
    Note: Make sure that has the same owner and permissions as
  11. Start Tomcat from the %TomcatDir%/bin/ directory, as follows:
    [root@t19c6264 bin]# ./
    An output similar to the following is displayed:
    Using CATALINA_BASE:   /opt/tomcat6
    Using CATALINA_HOME:   /opt/tomcat6
    Using CATALINA_TMPDIR: /opt/tomcat6/temp
    Using JRE_HOME:        /usr/java/jre1.7.0_51
    Using CLASSPATH:       /opt/tomcat6/bin/bootstrap.jar