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

Kernel Talks

Unix, Linux, & Cloud!

  • How-to guides
    • Howto
    • Disk management
    • Configurations
    • Troubleshooting
  • OS
    • HPUX
    • Linux
  • Miscellaneous
    • Software & Tools
    • Cloud Services
    • System services
    • Virtualization
  • Certification Preparations
    • AWS Certified Solutions Architect – Associate
    • AWS Certified Solutions Architect – Professional
    • AWS Certified SysOps Administrator – Associate
    • AWS Certified Cloud Practitioner
    • Certified Kubernetes Administrator
    • Hashicorp Certified Terraform Associate
    • Oracle Cloud Infrastructure Foundations 2020 – Associate
  • 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



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 setup SUSE Manager in AWS server
  • All you need to know about sosreport tool
  • Assorted list of resources to ease your AWS tasks
  • Googler : Search google right from your Linux terminal
  • The complete guide: logrotate utility on Linux
  • Install Ansible in Linux
  • Install LAMP in RHEL
  • How to restore nagios configuration from backup
  • Our list of SUSE Manager articles
  • SUSE Manager Client registration
  • How to install SSL certificate on Apache running on Linux
  • Nginx installation on Linux server

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

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-2023 KernelTalks · All Rights Reserved.
The content is copyrighted to Shrikant Lavhate & can not be reproduced either online or offline without prior permission.