diff --git a/GIT DOCUMENT.docx b/GIT DOCUMENT.docx new file mode 100644 index 0000000..71a0aa0 Binary files /dev/null and b/GIT DOCUMENT.docx differ diff --git a/GIT DOCUMENT.pdf b/GIT DOCUMENT.pdf new file mode 100644 index 0000000..ae0afea Binary files /dev/null and b/GIT DOCUMENT.pdf differ diff --git a/tomcat assignment.xml b/tomcat assignment.xml new file mode 100644 index 0000000..90a2cd9 --- /dev/null +++ b/tomcat assignment.xml @@ -0,0 +1,71 @@ +shell script to install git and maven using git bash and ec2 instance +#!/bin/bash +#update binaries +sudo apt-get update -y + +#git installation +sudo apt-get install git -y + +#maven installation +sudo apt-get install maven -y +---------------------------------------------- + +#tomcat installation +wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.91/bin/apache-tomcat-9.0.91.tar.gz +#Unzip the downloaded file +tar -xvzf apache-tomcat-9.0.91.tar.gz +#After unzip delete unzip file +rm -rf apache-tomcat-9.0.91.tar.gz +#Now move the directory name to tomcat +mv apache-tomcat-9.0.91 tomcat +#Go to bin directory inside the tomcat and execute startup.sh +sh tomcat/bin/startup.sh +-------------------------------------------------------------------------- + +#create artifacts and deploy in web server +mvn clean install +cd target +cp /home/ubuntu/java-hello-world-with-maven/target/jb-hello-world-maven-0.2.0.jar /home/ubuntu/tomcat/webapps/ +cp /home/ubuntu/Calendar.war /home/ubuntu/tomcat/webapps/ +---------------------------------------------------------------------------------- +#added users in tomcat +users=' + + + + +' + +sed -i '/tomcat-users>/d' /home/ubuntu/tomcat/conf/tomcat-users.xml +echo "$users" >> /home/ubuntu/tomcat/conf/tomcat-users.xml + +#modify restrictions +sed -e '/valve/s/^//g' -i /home/ubuntu/tomcat/webapps/manager/META-INF/context.xml +sed -e '/valve/s/^/