You can perform the following steps if you do not wish to have a standalone server for Jenkins master, and want to host it along with other services that exist on the Apache Tomcat server:
Move to the /tmp directory and download the Jenkins application using the wget command, as shown here:
cd /tmp wget http://mirrors.jenkins.io/war-stable/latest/jenkins.war
The previous command will download the latest stable version of jenkins.war file.
Move the file from /tmp to /opt/tomcat/:
sudo mv jenkins.war /opt/tomcat/webapps/
List the content of the /opt/tomcat/webapps/ directory :
You will notice that a jenkinsfolderautomatically gets created the moment you move thejenkins.warpackage to thewebappsfolder. This is because the.warfile is a web application archive file that automatically gets extracted once deployed to thewebappsdirectory. What we did is a small deployment activity.
And that is all you need to do. You can access Jenkins using http://<IP address of Tomcat server>:8080/jenkins.