Day 11 of 100 Days of Devops
Install and configure Tomcat Server
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 1.
b. Configure it to run on port 3000.
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 curl http://stapp01:3000
Configuring Tomcat
sudo yum install tomcat -y
Start the service
sudo systemctl start tomcat.service
Configuring the tomcat server
ps: Because of tomcat was installed using package manager so the default server config path is as follow /usr/share/tomcat/conf/server.xml
Change this to
1
2
3
4
5
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
maxParameterCount="1000"
/>
This
1
2
3
4
5
<Connector port="3000" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
maxParameterCount="1000"
/>
Verification
[tony@stapp01 tomcat]$ curl http://stapp01:3000
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>SampleWebApp</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Welcome to xFusionCorp Industries!</h2>
<br>
</body>
</html>