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