How to Install and Configure Jenkins on Linux Using yum, Tomcat, and Docker
This guide explains what Jenkins is, outlines its main features, and provides step‑by‑step instructions for installing Jenkins on Linux via three methods—yum package, Tomcat container, and Docker—including all required commands, configuration files, and how to retrieve the initial admin password.
Jenkins is an extensible continuous‑integration engine that automates building, testing, and monitoring of software projects.
Key features include easy installation (deploying jenkins.war without a database), a web‑based configuration UI, RSS/e‑mail notifications, JUnit/TestNG test reports, distributed builds across multiple machines, and artifact tracking.
Method 0x01 – yum installation : import the Jenkins yum repository with wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo , import the GPG key using rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key , install Jenkins via yum install jenkins , start the service with systemctl start jenkins , check its status with systemctl status jenkins , then open http://127.0.0.1:8080 and obtain the initial admin password from /var/lib/jenkins/secrets/initialAdminPassword .
Method 0x02 – Tomcat container : download the WAR file ( wget https://get.jenkins.io/war/2.286/jenkins.war ), place it in Tomcat’s webapps/jenkins directory, unzip it, start Tomcat ( ./startup.sh ), access http://127.0.0.1:8080/jenkins , and retrieve the password from /root/.jenkins/secrets/initialAdminPassword .
Method 0x03 – Docker installation : pull the official image with docker pull jenkins/jenkins , verify with docker images , create a host data volume ( mkdir -p /data/jenkins_workspace ) and set appropriate permissions ( chown -R 1000:1000 /data/jenkins_workspace or chmod 777 /data/jenkins_workspace ), then run the container: docker run -d --name jenkins -p 8081:8080 -p 50000:50000 -v /data/jenkins_workspace:/var/jenkins_home jenkins/jenkins:latest . Check the container with docker ps -a , and obtain the admin password either via docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword or directly from the host volume at /data/jenkins_workspace/secrets/initialAdminPassword . Finally, open http://127.0.0.1:8081 to complete the setup.
Full-Stack Internet Architecture
Introducing full-stack Internet architecture technologies centered on Java
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.