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