HOME > > Apache/Tomcat Installation on Linux

Apache/Tomcat Installation on Linux

Anup - Wednesday, December 4, 2019
  • Step 1: Downloads Apache Tomcat
  • Step 2: Create a user called "tomcat" to own the Tomcat installation.
# useradd tomcat
  • Step 3: Change user 
# su - tomcat
  • Step 4: FTP and untar Downloaded  to tomcat user base directory
$ tar xzf /tmp/jdk-8u77-linux-x64.tar.gz
  • Step 5: Set the following environment variables and append them to the "/home/tomcat/.bash_profile" so they are set for subsequent logins. Remember to set the desired JAVA_HOME correctly.
export JAVA_HOME=/home/tomcat/jdk1.8.0_77
export CATALINA_HOME=/home/tomcat/apache-tomcat-7.0.68
export CATALINA_BASE=$CATALINA_HOME

  • Step 5: Start and stop Tomcat using the following scripts.

  • $ $CATALINA_HOME/bin/startup.sh
    $ $CATALINA_HOME/bin/shutdown.sh
    Checking the Status of Tomcat

    There are several ways to check the status of the service.

    $ netstat -nlp | grep 8080
    tcp        0      0 :::8080                     :::*                        LISTEN      19034/java           
    $

    $ ps -ef | grep tomcat

    $ curl -I http://localhost:8080
    HTTP/1.1 200 OK
    Server: Apache-Coyote/1.1
    Content-Type: text/html;charset=ISO-8859-1
    Transfer-Encoding: chunked
    Date: Sat, 19 Mar 2016 15:09:53 GMT

      Contact me

      Get in Touch

      Need to get touch with me? Please fill out the form with your enquiry.

      Name
      Anup Srivastav
      Address
      Lucknow - Utter Pradesh
      Email
      myindiandba@gmail.com
      Message me