Last active
October 6, 2022 13:23
-
-
Save eMahtab/188d7d22b74ffec2ae1f4cad49b0ce93 to your computer and use it in GitHub Desktop.
Installing Tomcat 7 on Amazon Linux AMI through UserData
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -v | |
sudo yum update -y | |
sudo yum install -y tomcat7-webapps tomcat7-docs-webapp tomcat7-admin-webapps | |
sudo service tomcat7 start | |
# Copying a war to /usr/share/tomcat7/webapps directory | |
scp -i ~/awesome.pem ~/Downloads/sample.web [email protected]:/home/ec2-user | |
ssh -i ~/awesome.pem [email protected] | |
sudo su root | |
cp /home/ec2-user/sample.war /user/share/tomcat7/webapps/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment