How to install Apache tomcat 9.0.11 on linux step by step guide


How to install Apache tomcat 9.0.11 on linux

In this tutorial we learn how to install apache tomcat 9.0.11 on linux step by step. So first we have to know what is apache tomcat

What is Apache tomcat

Apache tomcat is an open source software which is used to deploy java servlets and jsp.apache is used for http service  and tomcat acts as a sevrlets  used for java technology.

Installation methods of apache tomcat 9.0.11 on linux

Step1: we need to check java version before installing apache tomcat 9.0.11. To check the java version we execute the below command.
[root@localhost ~]# java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

Step2: After checking the java version we need to download apache tomcat 9.0.11 tar package and exact the package into the /tmp folder. To download the packages we use wget if it is not installed on system ,to install it execute the below command.


[root@localhost ~]# yum install wget
[root@localhost tmp]# wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.11/bin/apache-tomcat-9.0.11.tar.gz
--2018-12-08 07:43:31--  https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.11/bin/apache-tomcat-9.0.11.tar.gz
Resolving archive.apache.org... 163.172.17.199
Connecting to archive.apache.org|163.172.17.199|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9904915 (9.4M) [application/x-gzip]
Saving to: “apache-tomcat-9.0.11.tar.gz”

100%[======================================>] 9,904,915    273K/s   in 2m 4s

2018-12-08 07:45:36 (78.3 KB/s) - “apache-tomcat-9.0.11.tar.gz” saved [9904915/9904915]


To extract the package we need to execute the below command.
[root@localhost tmp]# tar -xvf apache-tomcat-9.0.11.tar.gz

After extract the tar package we got the below directory
[root@localhost tmp]# ll
total 27776
drwxr-xr-x. 9 root root    4096 Dec  8 07:46 apache-tomcat-9.0.11

Step3: after completed the above steps move the directory to /opt folder. To move the directory to opt we execute the below command

[root@localhost tmp]# mv apache-tomcat-9.0.11 /opt

Step4:  now go to the /opt/ apache-tomcat-9.0.11/bin  directory and execute startup.sh script to start the apache tomcat service.

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

Step5: After starting the service we need to check that apache tomcat port is listening or not to use the below command.

[root@localhost ~]# netstat -tulpn | grep 8080
tcp        0      0 :::8080                     :::*                        LISTEN      1695/java

From the above output we saw that apache tomcat service is listening 8080 port.

Step6: After that you need to allow 8080 port in iptables .In my case iptables is not running.
For reference for iptables on linux go to below link.

https://techrideradmin.blogspot.com/2018/10/iptables-firewall-rule-chains-configuration-guide-on-linux-with-examples-for-beginners.html



Step7: After completed all the above stuff we verify through web browser.open the web browser and type http://serverip:8080
In our case server ip is 192.168.137.3

How to install Apache tomcat 9.0.11 on linux step by step guide

                                  How to install Apache tomcat 9.0.11 on linux step by step guide




Reading also: 


SHARE

Admin

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment