• Home
  • Disclaimer
  • Contact
  • Archives
  • About
  • Subscribe
  • Support
  • Advertise

Kernel Talks

Unix, Linux, & Cloud!

  • How-to guides
    • Howto
    • Disk management
    • Configurations
  • OS
    • HPUX
    • Linux
  • Commands & tools
    • Commands
    • Software & Tools
    • System services
  • Cloud computing
    • AWS CSA preparation guide!
    • Cloud Services
  • Tips & Tricks
  • Linux commands
You are here: Home / Software & Tools

How to install Apache Tomcat 9 in Linux

Published: January 7, 2019 | Modified: June 24, 2020 | 1,312 views



Learn how to install Apache 9 in Linux like RedHat, CentOs, Suse, OEL etc.

Apache Tomcat 9 installation

This is a quick post to a list of steps for Apache Tomcat 9 installation on Linux. Let’s start with download the software. Get your Apache Tomcat 9 from the official download page.

Apache being a webserver is part of LAMP stack. Red more about LAMP here.

First download core binary file from the official download page. Use tools like wget to download a file right on your server itself.

root@kerneltalks # wget http://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.14/bin/apache-tomcat-9.0.14.tar.gz

Now extract the tarball. You will have apache-tomcat-9.0.14 directory after unzipping.

root@kerneltalks # tar -xvf apache-tomcat-9.0.14.tar.gz

Now move the directory or its content to your required directory where you want your Apache Tomcat binaries should stay & you are done. For demonstration, I moved them in /opt

root@kerneltalks #  mv apache-tomcat-9.0.14 /opt

You have startup.sh and shutdown.sh scripts in the bin directory. Test them and you are all set. If you do not have java installed on your server, you will see below error while you try to start Apache.

root@kerneltalks #  cd /opt/apache-tomcat-9.0.14/bin
root@kerneltalks # sh startup.sh
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

Install java package using your package manager according to Linux you use. The package installation will set the above variables automatically. Then you can try starting Apache again.

root@kerneltalks # ]# sh startup.sh
Using CATALINA_BASE:   /opt/apache-tomcat-9.0.14
Using CATALINA_HOME:   /opt/apache-tomcat-9.0.14
Using CATALINA_TMPDIR: /opt/apache-tomcat-9.0.14/temp
Using JRE_HOME:        /
Using CLASSPATH:       /opt/apache-tomcat-9.0.14/bin/bootstrap.jar:/opt/apache-tomcat-9.0.14/bin/tomcat-juli.jar
Tomcat started.

And here you go. Your Apache instance is started with the default configuration. It listens on port 8080 by default. You can open your server IP in a browser and make sure you get default Apache page like below –

Apache welcome page

If not then check if port 8080 is listening or not. If you have a server in AWS, then make sure you open port in the related security group of your instance.

root@kerneltalks # netstat -an |grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN

Try restarting instance and you should be pass through!

⇠ Previous article
How to install sar in SUSE Linux
Next article ⇢
Install LAMP in RHEL

Related stuff:

  • How to use sudo access in winSCP
  • Run commands & copy files on salt clients from SUSE Manager Server
  • Install LAMP in RHEL
  • Get your Linux ISO download from these URLs
  • sar utility custom settings
  • Install Ansible in Linux
  • Package installation in Linux (YUM,APT & zypper)
  • How to check if the package is installed on Linux
  • How to add Oracle Linux public repository in SUSE Manger
  • How to generate CSR file for SSL request on Linux
  • All you need to know about sosreport tool
  • Install Python 3 on Linux (Redhat, CentOS, Ubuntu)

Filed Under: Software & Tools Tagged With: apache 9 in linux, apache tomcat 9, install apache 9

If you like my tutorials and if they helped you in any way, then

  • Consider buying me a cup of coffee via paypal!
  • Subscribe to our newsletter here!
  • Like KernelTalks Facebook page.
  • Follow us on Twitter.
  • Add our RSS feed to your feed reader.

Share Your Comments & Feedback: Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get fresh content from KernelTalks

  • Email
  • Facebook
  • RSS
  • Twitter

Popular posts

  • How to start, stop & restart MariaDB server in Linux
  • 4 ways to check the size of physical memory (RAM) in Linux
  • How to list YUM repositories in RHEL / CentOS
  • How to reset iptables to the default settings
  • How to rescan disk in Linux after extending VMware disk
  • How to configure login banners in Linux (RedHat, Ubuntu, CentOS, Fedora)
  • What are the huge pages in Linux?
  • How to remount filesystem in the read-write mode under Linux
  • How to upgrade package using YUM in RHEL
  • mount.nfs: requested NFS version or transport protocol is not supported

Get Linux & Unix stuff right into your mailbox. Subscribe now!

* indicates required

This work is licensed under a CC-BY-NC license · Privacy Policy
© Copyright 2016-2020 KernelTalks · All Rights Reserved.
The content is copyrighted to Shrikant Lavhate & can not be reproduced either online or offline without prior permission.