The Nautilus application development team recently finished the beta version of one of their Java-based applications, which they are planning to deploy on one of the app servers in Stratos DC. After an internal team meeting, they have decided to use the tomcat application server. Based on the requirements mentioned below complete the task:
a. Install tomcat server on App Server 3 using yum.
b. Configure it to run on port 8082.
c. There is a ROOT.war file on Jump host at location /tmp. Deploy it on this tomcat server and make sure the webpage works directly on base URL i.e without specifying any sub-directory anything like this http://URL/ROOT .
d. You can access the website on LBR link. To do so click on the + button on top of your terminal, select option Select port to view on Host 1, and after adding port 80 click on Display Port.
Sample Answer:
#login to app server as per the question(check your question )
ssh <user>@<App-server-03-IP>
#switch to root user
sudo su
#install tomcat server
yum -y install tomcat
#configure tomcat port in below section(port should be as per your question )
vi /usr/share/tomcat/conf/server.xml
<Connector port="<from your question>" protocol="HTTP/1.1"
connectionTimeout="20000"
press Esc key and type :wq!
#from jump host copy the ROOT.war file from jump host to app server (app server as per your question).To open jump host terminal, click on the + button on top of your terminal,
scp /tmp/ROOT.war <user>@<your-app-server-IP>:/tmp/
#Now from app server you have to copy the ROOT.war file to the correct location
cp /tmp/ROOT.war /usr/share/tomcat/webapps/
#enable and start tomcat server
systemctl enable tomcat
systemctl start tomcat
##Final testing
#from jump host
curl -I http://<app-server-IP>:<port>/
or
You can access the website on LBR link. To do so click on the + button on top of your terminal, select option Select port to view on Host 1, and after adding port 80 click on Display Port.
*Please comment on this post if you are facing any issues in the steps, also provide your feedback in the comments :)
there is a typo at the end of the command: cp /tmp/ROOT.war /usr/share/tomcat/weapps/
ReplyDeletechange weapps/ to webapps
thank you
ReplyDeletetypo has corrected