Apache Tomcat Installation and configuration Steps on Linux –

Tomcat is an open source Java application server. This article provides installation and configuration steps for Linux operating systems.

The how to install apache tomcat on linux redhat is a tutorial for installing and configuring Apache Tomcat on Linux.

Redhat, CentOS, Ubuntu, and other major Linux distributions are all compatible with Apache Tomcat. On Redhat Linux, we will install Apache Tomcat.

Step 1: Go to http://tomcat.apache.org and download the most recent version of Tomcat.

# wget # cd /var http://mirror.symnds.com/software/Apache/tomcat/tomcat-8/v8.0.14/bin/apache-tomcat-8.0.14.tar.gz

download latest tomcat version

Step 2: Get the Java Development Kit (JDK) for your Java environment.

# use the wget command http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz

Download JDK for Java environment

# tar -xvzf apache-tomcat-8.0.14.tar.gz apache-tomcat-8.0.14.tar.gz # vi /var/tomcat8/conf/server.xml # mv apache-tomcat-8.0.14 tomcat8

You may now specify the Apache Tomcat Port. As previously said, my Apache Tomcat port is 8080.


Tomcat’s primary configuration file is server.xml. It accomplishes two objectives: 1. Setting up the Tomcat components for the first time. 2. Specifying Tomcat’s structure, i.e. allowing Tomcat to start and construct itself using the components provided in server.xml.

Step 3: Configure Apache Tomcat’s Java Home

# catalina.sh /var/tomcat8/bin JAVA HOME=/var/jdk1.6.0 45 CATALINA OPTS=” -Dnet.spy.log. LoggerImpl=net.spy.memcached.compat.log. -Djava.awt.headless=true SunLogger -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremot -Dcom.sun.management.jmxremote.authenticate=false JAVA OPTS=” JAVA OPTS=” JAVA OPTS=” JAVA -d64 -server -Xms4096m -Xmx4096m -XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -XX:MaxNewSize=4096M -XX:ParallelGCThreads=4 -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=1800000 -Dsun.rmi.dgc.server.gcInterval=1800000 -XX: -EliminateLocks -XX:+UseParallelGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseStringCache -XX:+OptimizeStringConcat -XX:+DoEscapeAnalysis -XX:+UseFastAccessorMethods -XX:+UseFastAccessorMethod -XX:+AggressiveOpts -XX:+UseCompressedOops -Dorg.apache.jasper.compiler +ForceTimeHighResolution -XX:+AggressiveOpts -XX:+UseCompressedOops -Dorg.apache.jasper.compiler Parser. STRICT QUOTE ESCAPING=false #-Djavax.net.ssl.trustStore=/opt/tomcat/keystore.jks -Djavax.net.ssl.keyStorePassword=changeit” #-Djavax.net.ssl.keyStore=/tmp/vanilla/52.keystore -Djavax.net.ssl.keyStorePassword=changeit -Djavax.net.ssl.trustStorePassword=changeit”

catalina.sh file

Check the tomcat and JDK versions now.

check version of tomcat and jdk

How do I get Tomcat services up and running?

/var/tomcat88/bin/startup.sh # sh /var/tomcat88/bin/startup.sh

How can I disable Tomcat services?

/var/tomcat88/bin/shutdown.sh # sh /var/tomcat88/bin/shutdown.sh

Tomcat’s explanation of several directories

  • bin: This directory contains startup/shutdown… routines.
  • conf: Contains a number of configuration files, including server.xml (Tomcat’s primary configuration file) and web.xml, which specifies default settings for Tomcat’s different web applications.
  • doc: This folder contains various Tomcat-related papers.
  • lib: This directory contains Tomcat’s jar files. Any file in this directory is added to Tomcat’s classpath on UNIX.
  • logs: This is where Tomcat’s log files are stored.
  • src: The source files for the servlet APIs. Don’t get too enthusiastic; they are just the empty interfaces and abstract classes that every servlet container should implement.
  • webapps: This folder contains examples of web applications.

Check to see whether Tomcat is setup properly.


You should acquire something like this.

check if tomcat is configured correctly

The tomcat linux commands is a command-line tool that allows users to install and configure Apache Tomcat.

Frequently Asked Questions

What are the steps to install and configure the Tomcat server?

1) Download the Tomcat server software. 2) Unzip the file and run the configuration wizard. 3) Enter the information about your computer, including its IP address or domain name. 4) Select Create a new database in the Database section of the wizard. 5) Enter a name for your database (e.g., tomcat). 6) In the Data Source Name field, enter jdbc/tomcat-dbname. 7) Click Next to continue with installation. 8) Accept all of the default settings on this screen by clicking Next again to proceed with installation. 9) When installation is complete, click Finish to close the wizard.

Where is Apache Tomcat installed on Linux?

Apache Tomcat is installed in /opt/tomcat on Linux.

How do I start Apache Tomcat on Linux?

You can start Apache Tomcat on Linux with the following command: sudo service tomcat6 start

Related Tags

  • how to install apache tomcat 9 on linux redhat
  • how to install apache tomcat in centos 7
  • install tomcat 8 on linux
  • install tomcat on linux ec2
  • install tomcat 9 on linux