Skip to content

Commit ea62769

Browse files
authored
Create installtomcat69.sh
1 parent 32528fb commit ea62769

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Steps for Installing tomcat9 on rhel7&8
2+
# install Java JDK 1.8+ as a pre-requisit for tomcat to run.
3+
# https://github.com/LandmakTechnology/package-management/tree/main/Tomcat-installation
4+
sudo hostnamectl set-hostname tomcat
5+
cd /opt
6+
sudo yum install git wget vim -y
7+
sudo yum install java-1.8.0-openjdk-devel -y
8+
# Download tomcat software and extract it.
9+
# dowanload and extract tomcat software
10+
sudo wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.69/bin/apache-tomcat-9.0.69.tar.gz
11+
sudo tar -xvf apache-tomcat-9.0.69.tar.gz
12+
sudo rm apache-tomcat-9.0.69.tar.gz
13+
sudo mv apache-tomcat-9.0.69 tomcat9
14+
sudo chmod 777 -R /opt/tomcat9
15+
sudo sh /opt/tomcat9/bin/startup.sh
16+
# create a soft link to start and stop tomcat from anywhere
17+
# to manage tomcat as a service
18+
sudo ln -s /opt/tomcat9/bin/startup.sh /usr/bin/starttomcat
19+
sudo ln -s /opt/tomcat9/bin/shutdown.sh /usr/bin/stoptomcat
20+
sudo starttomcat
21+
echo "end on tomcat installation"
22+
sudo su - ec2-user

0 commit comments

Comments
 (0)