Install apache tomcat 8 |In this
tutorial we learn how to install apache tomcat 8.5.37 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.37 on CentOS 7
Step1: we need to check java version
before installing apache tomcat 8.5.37. 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.37 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 ~]#
wget
https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.37/bin/apache-tomcat-8.5.37.tar.gz
--2019-01-07
23:19:35--
https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.37/bin/apache-tomcat-8.5.37.tar.gz
Resolving
archive.apache.org (archive.apache.org)... 163.172.17.199
Connecting to
archive.apache.org (archive.apache.org)|163.172.17.199|:443... connected.
HTTP request sent,
awaiting response... 200 OK
Length: 9653382 (9.2M)
[application/x-gzip]
Saving to:
‘apache-tomcat-8.5.37.tar.gz’
100%[======================================>]
9,653,382 47.6KB/s in 3m 53s
2019-01-07 23:23:31
(40.4 KB/s) - ‘apache-tomcat-8.5.37.tar.gz’ saved [9653382/9653382]
To extract the package we need to
execute the below command.
[root@localhost tmp]#
tar -xvf apache-tomcat-8.5.37.tar.gz
After extract the tar package we got
the below directory
[root@localhost tmp]#
ll
drwxr-xr-x. 9 root
root 220 Jan 7 23:24 apache-tomcat-8.5.37
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.37 /opt
Step4:
now go to the /opt/ apache-tomcat-8.5.37/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.37
Using
CATALINA_HOME:
/opt/apache-tomcat-8.5.37
Using CATALINA_TMPDIR:
/opt/apache-tomcat-8.5.37/temp
Using JRE_HOME: /usr
Using CLASSPATH:
/opt/apache-tomcat-8.5.37/bin/bootstrap.jar:/opt/apache-tomcat-8.5.37/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 ~]# ss
-tulpn | grep 8080
tcp LISTEN
0 100 :::8080 :::*
users:(("java",pid=11356,fd=49))
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
In our case server ip is
192.168.137.7
0 comments:
Post a Comment