-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTomCat
107 lines (52 loc) · 2.01 KB
/
TomCat
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Tomcat main page: index.jsp
/usr/local/tomcat/webapps/ROOT
FROM tomcat:8.0-alpine
LABEL maintainer="[email protected]"
ADD sample.war /usr/local/tomcat/webapps/
RUN addgroup tomcatusers && adduser -D tomcat && adduser tomcat tomcatusers
RUN chown -R tomcat:tomcatusers .
USER tomcat
EXPOSE 8080
CMD ["catalina.sh", "run"]
docker build -t mywebapp .
docker run -d -p 80:8080 mywebapp
https://aspetraining.com/resources/blog/deploying-your-first-web-app-to-tomcat-on-docker
=================================================================================================================================
FROM tomcat
MAINTAINER [email protected]
COPY sample.war /usr/local/tomcat/webapps/
CMD ["catalina.sh", "run"]
// docker build -t tomi .
// docker run -p 8080:8080 tomi
https://github.com/ardydedase/docker-tomcat-war
sudo service apache2 stop
--------------------------------------------------------------------------------
<How to install Tomcat7 on EC2
/> su -c "yum install java-1.8.0-openjdk"
/> java -version
/> wget http://www-us.apache.org/dist/tomcat/tomcat-7/v7.0.105/bin/apache-tomcat-7.0.105.tar.gz
/> tar xzf apache-tomcat-7.0.105.tar.gz
/> mv apache-tomcat-7.0.105 /usr/local/tomcat7
/> cd /usr/local/tomcat7
/> ./bin/startup.sh
https://archive.apache.org/dist/tomcat/tomcat-7/
https://tecadmin.net/steps-to-install-tomcat-server-on-centos-rhel/
/> cd /usr/local/tomcat7/conf/
/> vim tomcat-users.xml
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
</tomcat-users>
/> ./bin/shutdown.sh
/> ./bin/startup.sh
http://18.210....:8080/manager
username: admin
password: admin
Add WAR.file sample.war click on sample see the page !!!!!!
WORKING!!!