In
this blog, we are going to learn how we can set up a tomcat server on the local or remote machines for web-application deployment.
To deploy files we need to use “Deploy Plugin”. This plugin takes a war/ear file and deploys that to a running remote application server or local machine at the end of a build. The list of currently supported containers include:
· Tomcat
4.x/5.x/6.x/7.x and higher
· JBoss
3.x/4.x
· Glassfish
2.x/3.x
Below
Steps we need to follow to first setup Tomcat Server on our local or Remote
Machine:
2) Unzip
Tomcat File, under Setup in a conf folder inside Server.xml we can update the default port for the tomcat server. Please Note by default tomcat server runs on
Port 8080 but in this example, I have updated the port to 8181 since my Jenkins is
already running on port 8080.
3)In
the Same Folder, inside tomcat-user.xml add one new user role or update any
existing user with the below role.
<user
username="deployer" password="deployer"
roles="manager-gui,manager-script,admin"/>
4)To Start Tomcat, Inside Bin click on startup or to shutdown we can also use shutdown.
Tomcat Server is up and
running on Port 8181
You may also be interested in
knowing how to do automatic deployment on Tomcat Server using Jenkins. Please
visit this blog for more details.