Tomcat
Tomcat
AWS Control Managerrequest to cyber security team SSL certificate email Forward to us
SSL link add to Tomcat instance
sudo yum update - for updating aws instance
sudo yum install java-1.8.0-openjdk-devel – install java
sudo yum install git – Install git or yum install -y git
git clone https://github.com/Rahul0104Amb/myweb.git -cloning repository
sudo yum install maven - install maven
mvn –version -check version
mvn clean install -for updating maven
cd myweb/ - we will find pom.file
ls
mvn clean package - it will run maven (in red coulur) Building war:
/home/ec2-user/myweb/target/myweb-8.2.0.war
cd target/
ls - this 2 commands will show target file myweb-8.2.0.war in red colour
sudo yum install java-1.8.0-openjdk-devel # For Amazon Linux
sudo apt install openjdk-8-jdk # For Ubuntu
type tomcat in google
open Tomcat 9.0-> copy tar,gz file
sudo wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.78/bin/apache-tomcat-9.0.78.tar.gz
- for downloading tomcat (wget means get from website) apache-tomcat-9.0.78.tar.gz
downloaded
ls – it will show apache-tomcat-9.0.78.tar.gzin red colour
tar -xvf apache-tomcat-9.0.78.tar.gz– x-unzip, v -verbose, f-forcefull
ls - it will get directory in blue colour TOMACAT INSTALLATION COMPLETED
cd apache-tomcat-9.0.78 - it will open below directories
bin -start/stop
conf – user.xml file
lib-
logs
webapps
cd webapps/ >
pwd > it will display home/ec2-user/myweb/target
If permission denied
cd webapps/
pwd
Go to Tomcat Instance
cd..
ls > it will display bin config lib logs to start tomcat we should go into bin
./startup.sh > to run shell script we should enter ./ for starting tomcat service
cd..
cd webapps/ >
ls > it will show directory which includes mywe b 8.2.0 in blue colour
Next copy Tomcat Public Ip & paste in browser 24.656.23.8:8080 it will display website and next
24.656.23.8:8080/web apps
ls
for checking Next copy Tomcat Public Ip & paste in browser 24.656.23.8:8080 it will display website and
next 24.656.23.8:8080/web apps
cd .. To come out
It will show 2 Tags Value tag & Manager tag, we should delete it as it as 127 – loop back address
Esc ;wq!
cd conf/
vi tomcat-users.xml scroll down to the last line & go to insert mode > enter at up arrow>select 1 st
3 lines & copy and paste end
If we do nay modifications in tomcat we should stop and start services (go into bin)
Cd ..
Ls
Cd bin
Ls
./shutdown.sh
./startup.sh
for checking Next copy Tomcat Public Ip & paste in browser 24.656.23.8:8080 it will display website and
next 24.656.23.8:8080/web apps
Cd ..
Cd conf/
Vi server.xml edit
Find the above and edit edit 8080 to2525
Esc :wq!
Cd bin
ls
./shutdown.sh
./startup.sh
vi server.xml for searching any word we can see by pressing Esc /8080
scroll down for below and edit port no. from 8080 to 5678 example
And scroll down further for ssl certificate link and change the ssl certificate link in “” given by cyber
security team aws control manager devops team
Esc :Wq!
If we do any modifications in tomcat we should go into bin directory & stop & start services
Cd ..
Cd bin
ls
./shutdown.sh
./startup.sh
Cd ..
Ls