-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtomcat.sh
More file actions
11 lines (11 loc) · 807 Bytes
/
Copy pathtomcat.sh
File metadata and controls
11 lines (11 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
yum install java-21-amazon-corretto -y
wget https://dlcdn.apache.org/tomcat/tomcat-11/v11.0.22/bin/apache-tomcat-11.0.22.tar.gz
tar -zxvf apache-tomcat-11.0.22.tar.gz
sed -i '56 a\<role rolename="manager-gui"/>' apache-tomcat-11.0.22/conf/tomcat-users.xml
sed -i '57 a\<role rolename="manager-script"/>' apache-tomcat-11.0.22/conf/tomcat-users.xml
sed -i '58 a\<user username="tomcat" password="ccit123" roles="manager-gui, manager-script"/>' apache-tomcat-11.0.22/conf/tomcat-users.xml
sed -i '59 a\</tomcat-users>' apache-tomcat-11.0.22/conf/tomcat-users.xml
sed -i '56d' apache-tomcat-11.0.22/conf/tomcat-users.xml
sed -i '21d' apache-tomcat-11.0.22/webapps/manager/META-INF/context.xml
sed -i '22d' apache-tomcat-11.0.22/webapps/manager/META-INF/context.xml
sh apache-tomcat-11.0.22/bin/startup.sh