Open AWS console and launch an instance ec2 with the configuration of Amazon-Linux-2 5.0kernel,key-pair, security group





Successfully launch an Instance.
Here we can see, in the red box the EC2 instance.

check the box and connect to the console terminal.

Now install the tomcat and change the configuration settings.
- Install java in the console.
- amazon-linux-extras install java-open-jdk11 -y
- Goto dlcdn.apache.org and select /tomcat/tomcat-9/v9.0.87/bin/

Copy the url which is in redmark.
check the box and connect to the console terminal.

Give the commands in the above screenshot,
And I am pasting here the commands,
“ amazon-linux-extras install java-openjdk11 -y”
“ls”
“ wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.87/bin/apache-tomcat-9.0.87.tar.gz”
“ ls”
“ tar -zxvf apache-tomcat-9.0.87.tar.gz”
enter to,
“ cd apache-tomcat-9.0.87 “


change the directory to
“cd /webapps/manager/META-INF”
give the command “vim context.xml”
And change the .xml file
allow=”.*”

Give the command
cd ../../..

in “conf” directory check for tomcat-users.xml
vim tomcat-users.xml

<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
<user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
<user username="role1" password="<must-be-changed>" roles="role1"/>
-->
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="123456" roles="manager-gui,manager-script"/>
</tomcat-users>

start the tomcat server
cd . .
Cd bin/./startup.sh
now open your tomcat web application now, give the ipaddress:8080

1 thought on “Tomcat setting for Production”