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


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

In this tutorial we learn how to install apache tomcat 8.5.30 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 8.5.30 on linux

Step1: we need to check java version before installing apache tomcat 8.5.30. 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 8.5.30 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-8/v8.5.30/bin/apache-tomcat-8.5.30.tar.gz
--2018-12-08 07:26:37--  https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.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: 9541892 (9.1M) [application/x-gzip]
Saving to: “apache-tomcat-8.5.30.tar.gz”

100%[======================================>] 9,541,892    210K/s   in 53s

2018-12-08 07:27:32 (176 KB/s) - “apache-tomcat-8.5.30.tar.gz” saved [9541892/9541892]


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

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

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-8.5.30 /opt

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

[root@localhost bin]# ./startup.sh
Using CATALINA_BASE:   /opt/apache-tomcat-8.5.30
Using CATALINA_HOME:   /opt/apache-tomcat-8.5.30
Using CATALINA_TMPDIR: /opt/apache-tomcat-8.5.30/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /opt/apache-tomcat-8.5.30/bin/bootstrap.jar:/opt/apache-tomcat-8.5.30/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      1584/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 8.5.30 on linux step by step guide

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





SHARE

Admin

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

0 comments:

Post a Comment