• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install Apache Tomcat 9.0.21 Version on CentOS 7.6

  • 00:46 wget http://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.21/bin/apache-tomcat-9.0.21.zip
  • 01:02 unzip apache-tomcat-9.0.21.zip
  • 01:18 echo "export CATALINA_HOME="/usr/local/tomcat9"" >> ~/.bashrc
  • 01:23 source ~/.bashrc
  • 01:53 ./startup.sh
  • 01:58 netstat -tulpn | grep 8080
{{postValue.id}}

Installation of Apache Tomcat 9.0.21

Pre-requisistes:

Java -12

Download link :

http://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.21/bin/apache-tomcat-9.0.21.zip

Installation Procedure:

Change the directory to the localdirectory under /usr

[root@linuxhelp ~]# cd /usr/local

Download the Apache tomcat 9 using wget as follows:

[root@linuxhelp local]# wget http://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.21/bin/apache-tomcat-9.0.21.zip
--2019-06-18 01:33:20--  http://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.21/bin/apache-tomcat-9.0.21.zip
Resolving mirrors.estointernet.in (mirrors.estointernet.in)... 103.123.234.254, 2403:8940:ffff::f
Connecting to mirrors.estointernet.in (mirrors.estointernet.in)|103.123.234.254|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11478988 (11M) [application/zip]
Saving to: ‘apache-tomcat-9.0.21.zip’

100%[====================================================================================================>] 11,478,988   925KB/s   in 12s    

2019-06-18 01:33:32 (897 KB/s) - ‘apache-tomcat-9.0.21.zip’ saved [11478988/11478988]

List the content to view the zip file of apache tomcat 9

[root@linuxhelp local]# ll
total 11212
-rw-r--r--  1 root root 11478988 Jun  5 02:18 apache-tomcat-9.0.21.zip
drwxr-xr-x. 2 root root       22 Jun 18 00:46 bin
drwxr-xr-x. 2 root root        6 Apr 11  2018 etc
drwxr-xr-x. 2 root root        6 Apr 11  2018 games
drwxr-xr-x. 2 root root        6 Apr 11  2018 include
drwxr-xr-x. 2 root root        6 Apr 11  2018 lib
drwxr-xr-x. 2 root root        6 Apr 11  2018 lib64
drwxr-xr-x. 2 root root        6 Apr 11  2018 libexec
drwxr-xr-x. 2 root root        6 Apr 11  2018 sbin
drwxr-xr-x. 5 root root       49 Apr 11  2018 share
drwxr-xr-x. 2 root root        6 Apr 11  2018 src

Extract the downloaded zip file of tomcat apache 9

[root@linuxhelp local]# unzip apache-tomcat-9.0.21.zip
Archive:  apache-tomcat-9.0.21.zip
   creating: apache-tomcat-9.0.21/
   creating: apache-tomcat-9.0.21/bin/
   creating: apache-tomcat-9.0.21/conf/
   creating: apache-tomcat-9.0.21/lib/
   creating: apache-tomcat-9.0.21/logs/
   creating: apache-tomcat-9.0.21/temp/
   creating: apache-tomcat-9.0.21/webapps/
   creating: apache-tomcat-9.0.21/webapps/ROOT/
   creating: apache-tomcat-9.0.21/webapps/ROOT/WEB-INF/
   creating: apache-tomcat-9.0.21/webapps/docs/
   creating: apache-tomcat-9.0.21/webapps/docs/WEB-INF/
.
.
.
.
.
.
inflating: apache-tomcat-9.0.21/webapps/manager/WEB-INF/jsp/connectorCiphers.jsp  
  inflating: apache-tomcat-9.0.21/webapps/manager/WEB-INF/jsp/connectorTrustedCerts.jsp  
  inflating: apache-tomcat-9.0.21/webapps/manager/WEB-INF/jsp/sessionDetail.jsp  
  inflating: apache-tomcat-9.0.21/webapps/manager/WEB-INF/jsp/sessionsList.jsp  
  inflating: apache-tomcat-9.0.21/webapps/manager/WEB-INF/web.xml  
  inflating: apache-tomcat-9.0.21/webapps/manager/images/asf-logo.svg  
  inflating: apache-tomcat-9.0.21/webapps/manager/images/tomcat.gif  
  inflating: apache-tomcat-9.0.21/webapps/manager/index.jsp  
  inflating: apache-tomcat-9.0.21/webapps/manager/status.xsd  
  inflating: apache-tomcat-9.0.21/webapps/manager/xform.xsl  

List the contents to view the extracted directory.

[root@linuxhelp local]# ll
total 11212
drwxr-xr-x  9 root root      220 Jun  4 21:23 apache-tomcat-9.0.21
-rw-r--r--  1 root root 11478988 Jun  5 02:18 apache-tomcat-9.0.21.zip
drwxr-xr-x. 2 root root       22 Jun 18 00:46 bin
drwxr-xr-x. 2 root root        6 Apr 11  2018 etc
drwxr-xr-x. 2 root root        6 Apr 11  2018 games
drwxr-xr-x. 2 root root        6 Apr 11  2018 include
drwxr-xr-x. 2 root root        6 Apr 11  2018 lib
drwxr-xr-x. 2 root root        6 Apr 11  2018 lib64
drwxr-xr-x. 2 root root        6 Apr 11  2018 libexec
drwxr-xr-x. 2 root root        6 Apr 11  2018 sbin
drwxr-xr-x. 5 root root       49 Apr 11  2018 share
drwxr-xr-x. 2 root root        6 Apr 11  2018 src

Rename the extracted directory to tomcat9

[root@linuxhelp local]# mv apache-tomcat-9.0.21 tomcat9

Setup a environment variable for the tomcat 9 in the following location.

[root@linuxhelp local]# echo "export CATALINA_HOME="/usr/local/tomcat9"" >> ~/.bashrc

Reload the variables

[root@linuxhelp local]# source ~/.bashrc

Change the directory to bin

[root@linuxhelp local]# cd tomcat9/bin

List the contents in the bin directory

[root@linuxhelp bin]# ll
total 864
-rw-r--r-- 1 root root  35064 Jun  4 21:21 bootstrap.jar
-rw-r--r-- 1 root root  15900 Jun  4 21:21 catalina.bat
-rw-r--r-- 1 root root  23447 Jun  4 21:21 catalina.sh
-rw-r--r-- 1 root root   1703 Jun  4 21:21 catalina-tasks.xml
-rw-r--r-- 1 root root   2123 Jun  4 21:21 ciphers.bat
-rw-r--r-- 1 root root   1997 Jun  4 21:21 ciphers.sh
-rw-r--r-- 1 root root  25145 Jun  4 21:21 commons-daemon.jar
-rw-r--r-- 1 root root 207125 Jun  4 21:21 commons-daemon-native.tar.gz
-rw-r--r-- 1 root root   2040 Jun  4 21:21 configtest.bat
-rw-r--r-- 1 root root   1922 Jun  4 21:21 configtest.sh
-rw-r--r-- 1 root root   8513 Jun  4 21:21 daemon.sh
-rw-r--r-- 1 root root   2091 Jun  4 21:21 digest.bat
-rw-r--r-- 1 root root   1965 Jun  4 21:21 digest.sh
-rw-r--r-- 1 root root   3606 Jun  4 21:21 makebase.bat
-rw-r--r-- 1 root root   3382 Jun  4 21:21 makebase.sh
-rw-r--r-- 1 root root   3460 Jun  4 21:21 setclasspath.bat
-rw-r--r-- 1 root root   3708 Jun  4 21:21 setclasspath.sh
-rw-r--r-- 1 root root   2020 Jun  4 21:21 shutdown.bat
-rw-r--r-- 1 root root   1902 Jun  4 21:21 shutdown.sh
-rw-r--r-- 1 root root   2022 Jun  4 21:21 startup.bat
-rw-r--r-- 1 root root   1904 Jun  4 21:21 startup.sh
-rw-r--r-- 1 root root  47880 Jun  4 21:21 tomcat-juli.jar
-rw-r--r-- 1 root root 418909 Jun  4 21:21 tomcat-native.tar.gz
-rw-r--r-- 1 root root   4574 Jun  4 21:21 tool-wrapper.bat
-rw-r--r-- 1 root root   5515 Jun  4 21:21 tool-wrapper.sh
-rw-r--r-- 1 root root   2026 Jun  4 21:21 version.bat
-rw-r--r-- 1 root root   1908 Jun  4 21:21 version.sh

Assign the writable permissions to the startup.sh and cataline.sh

[root@linuxhelp bin]# chmod -R 777 startup.sh
[root@linuxhelp bin]# chmod -R 777 catalina.sh

Run the startup script

[root@linuxhelp bin]# ./startup.sh
Using CATALINA_BASE:   /usr/local/tomcat9
Using CATALINA_HOME:   /usr/local/tomcat9
Using CATALINA_TMPDIR: /usr/local/tomcat9/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/local/tomcat9/bin/bootstrap.jar:/usr/local/tomcat9/bin/tomcat-juli.jar
Tomcat started.

Verify the port number 8080

[root@linuxhelp bin]# netstat -tulpn | grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN      10829/java          

Open the browser and enter the server_name followed by port number to verify the installation of apache tomcat 9. snap1 (1) snap1 (2)

With this,Installation of Apache tomcat 9.0.21 Using LEMP On CentOS 7.6 comes to end.

Tags:
sebastian
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the use of apache tomcat ?

A

Apache tomcat is used to deploy Java Servelets and JSP's

Q

What does java servlets do in apache tomcat?

A

A java servlet is a java software component that extends the capabilities of a server in apache tomcat.

Q

What is the main purpose of Java servlets in apache tomcat?

A

The main purpose of the java servlets is for sending content to a client which generates dynamic content on the web in apache tomcat.

Q

Why do we need JSP's in apache tomcat?

A

We need JSP's which is easy to code and to read in apache tomcat

Q

Is JSP a server-side Scripting language in apache tomcat?

A

Yes, JSP is a server-side Scripting language in apache tomcat.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Isaiah ?
What is the use of SUID & SGID commands

How to set the special permissions to the files and folders using SUID and SGID commands...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.