forked from ssts-alg/installations
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEnable-Tomcat-on-reboot.txt
More file actions
64 lines (50 loc) · 1.1 KB
/
Enable-Tomcat-on-reboot.txt
File metadata and controls
64 lines (50 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
STEP-1
cd /opt
STEP-2
sudo wget http://mirrors.fibergrid.in/apache/tomcat/tomcat-8/v8.5.34/bin/apache-tomcat-8.5.34.tar.gz
STEP-3
sudo tar -xvf apache-tomcat-8.5.34.tar.gz
STEP-4
sudo rm -rf apache-tomcat-8.5.34.tar.gz
STEP-5
sudo mv apache-tomcat-8.5.34 tomcat8
STEP-6
cd /etc/init.d
STEP-7
sudo vi tomcat8
STEP-8
##############PASTE THE BELOW CONTENT###############
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
CATALINA_HOME=/opt/tomcat8
case $1 in
start)
sh $CATALINA_HOME/bin/startup.sh
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh
;;
esac
exit 0
#################################################
STEP-9
sudo chmod 755 tomcat8
STEP-9
sudo chkconfig --add tomcat8
STEP-10
sudo chkconfig --level 234 tomcat8 on
STEP-11
sudo service tomcat8 start
sudo chkconfig tomcat8 on
###################################################
EXTRA COMMANDS:
1. service tomcat8 start
2. service tomcat8 stop
3. service tomcat8 restart
4. chkconfig --list tomcat8