Tomcat Install and Configuration Tutorial and Guide


Method 1 – Install and Configuration Tomcat in Any Linux using Zip file

Download Location of Tomcat –

https://tomcat.apache.org/download-90.cgi


$ sudo -s
$ yum install java-11-openjdk-devel
$ cd /opt/
$ yum install unzip wget -y

# If the download URL is not working, please get a updated URL from Tomcat website with your version

# Version Tomcat 9
$ wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.58/bin/apache-tomcat-9.0.58.zip --no-check-certificate
$ unzip apache-tomcat-9.0.58.zip
$ cd apache-tomcat-9.0.58
$ cd bin/
$ ls
$ chmod -R 755 .
$ ./startup.sh
$ ps -eaf | grep tomcat

# Version Tomcat 8
$ wget https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.81/bin/apache-tomcat-8.5.81.zip --no-check-certificate
$ unzip apache-tomcat-8.5.81.zip
$ cd apache-tomcat-8.5.81
$ cd bin/
$ ls
$ chmod -R 755 .
$ ./startup.sh
$ ps -eaf | grep tomcat

Method 2 – Install Tomcat Using Package Manager YUM in RHEL/Centos


$ yum install java-1.8.0-openjdk-devel
$ sudo -s
$ yum install tomcat
$ systemctl start tomcat
$ systemctl status tomcat
$ java -version

Executable Location of Tomcat 
$ which tomcat
$ ls /usr/sbin/tomcat

Configuration Directory of Tomcat
$ ls /etc/tomcat/

Log Location of Tomcat
$ ls /var/log/tomcat/

How to remove Tomcat installed using Yum in RHEL/Centos?


$ yum remove tomcat
$ rm -rf /usr/sbin/tomcat
$ rm -rf /etc/tomcat/
$ rm -rf /var/log/tomcat/

How to Access Tomcat?

Tomcat default port number is – 8080

Disable and Stop a firewall for Easy learning. Not a good pratice though. Rather, you should create exception in firewall for 8080 port number.

# For RHEL/CentOs
$ systemctl stop firewalld
$ systemctl disable firewalld
Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x