Install Apache Tomcat Server in Red Hat Linux

Download Link for Tomcat server

Filename: zip (download zip file)


Install Apache Tomcat

Unzip the folder

# unzip

Give execute permission

# chmod -R 755 apache-tomcat-8.5.9/

Check the dependent variable

# echo $JAVA_HOME


Run the Apache Tomcat

# ./bin/ start

install tomcat in red hat linux Mentor IT

Stop the Apache Tomcat

# ./bin/ stop

Change the port 8080 to 8181

# vim conf/server.xml

Change port in tomcat in Red hat linux Mentor IT

Install Java JDK 8 in Red Hat Linux

Download Link for JDK

Filename: jdk-8u111-linux-x64.rpm


Check Java in your machine

# java -version

#echo $JAVA_HOME

Remove java from your machine

# Yum remove java*


Installing Java

# rpm -Uvh jdk-8u111-linux-x64.rpm

# vi /etc/profile

In Editor write following

export JAVA_HOME=/usr/java/default

export PATH=$PATH:$JAVA_HOME/bin

export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar

# source /etc/profile

Then check the java installation by follwoing command

# java -version

#echo $JAVA_HOME

Create Local Yum Repository in Red Hat Linux 7

Copy the folder ‘Packages’ to the linux machine

Yum Repository Mentor IT


It can be extracted from the linux ISO file. This Packages folder contain all the required packages.

Run Following Command. I have copied Packages into /root/ location

# createrepo /root/Packages


Go to following directory

# cd /etc/yum.repos.d

# ls

# vim mentor.repo


In Editor


name=local yum repo





Run following command

# yum clean all

# yum list all


Now ready to install packages from Yum

# yum -y install <package_name>


Check list of package in yum

yum list

yum list all

yum list installed