0
0
Jenkinsdevops~10 mins

Installing on Linux in Jenkins - Visual Walkthrough

Choose your learning style9 modes available
Process Flow - Installing on Linux
Update package index
Install Java (Jenkins dependency)
Add Jenkins repository key
Add Jenkins repository
Update package index again
Install Jenkins package
Start and enable Jenkins service
Check Jenkins status
END
This flow shows the step-by-step process to install Jenkins on Linux, starting from updating packages, installing dependencies, adding Jenkins repository, installing Jenkins, and finally starting the service.
Execution Sample
Jenkins
sudo apt update
sudo apt install openjdk-11-jdk -y
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt install jenkins -y
sudo systemctl start jenkins
sudo systemctl enable jenkins
sudo systemctl status jenkins
This code installs Jenkins on a Debian-based Linux system by updating packages, installing Java, adding Jenkins repo, installing Jenkins, and starting the Jenkins service.
Process Table
StepCommandActionResultSystem State Change
1sudo apt updateUpdate package indexPackage lists updatedPackage index refreshed
2sudo apt install openjdk-11-jdk -yInstall JavaJava installedJava runtime available
3wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -Add Jenkins repo keyKey added successfullySystem trusts Jenkins repo
4sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'Add Jenkins repoRepo added to sources.list.dJenkins repo available for apt
5sudo apt updateUpdate package index againPackage lists updated with Jenkins repoPackage index refreshed with Jenkins packages
6sudo apt install jenkins -yInstall Jenkins packageJenkins installedJenkins software installed
7sudo systemctl start jenkinsStart Jenkins serviceJenkins service startedJenkins running
8sudo systemctl enable jenkinsEnable Jenkins service at bootJenkins enabled on startupJenkins auto-start configured
9sudo systemctl status jenkinsCheck Jenkins service statusActive (running)Confirmed Jenkins is running
10-End of installation-Jenkins installed and running
💡 Installation completes after Jenkins service is running and enabled on system boot.
Status Tracker
VariableStartAfter Step 2After Step 6After Step 7Final
package_indexoutdatedupdatedupdatedupdatedupdated
java_installednoyesyesyesyes
jenkins_repo_addednonoyesyesyes
jenkins_installednonoyesyesyes
jenkins_service_statusstoppedstoppedstoppedrunningrunning
jenkins_enabled_on_bootnonononoyes
Key Moments - 3 Insights
Why do we run 'sudo apt update' twice during installation?
The first 'apt update' refreshes the package list before installing Java. After adding the Jenkins repository, we run 'apt update' again to include Jenkins packages in the package list, as shown in steps 1 and 5 in the execution_table.
What happens if Java is not installed before Jenkins?
Jenkins requires Java to run. If Java is missing, Jenkins installation or startup will fail. Step 2 ensures Java is installed before Jenkins installation in step 6.
What does 'sudo systemctl enable jenkins' do?
It configures Jenkins to start automatically when the system boots. This is shown in step 8 where Jenkins is enabled on startup.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, at which step is Jenkins service started?
AStep 6
BStep 7
CStep 8
DStep 9
💡 Hint
Check the 'Action' column for 'Start Jenkins service' in the execution_table.
According to variable_tracker, when does 'jenkins_installed' change from 'no' to 'yes'?
AAfter Step 2
BAfter Step 7
CAfter Step 6
DAfter Step 8
💡 Hint
Look at the 'jenkins_installed' row and see when it changes value.
If we skip adding the Jenkins repository (step 4), what will happen when running 'sudo apt install jenkins'?
AInstallation fails because Jenkins package is not found
BJenkins installs successfully from default repos
CJava will not be installed
DJenkins service will start automatically
💡 Hint
Refer to step 4 and 6 in the execution_table about repository addition and package installation.
Concept Snapshot
Installing Jenkins on Linux:
1. Update package index: sudo apt update
2. Install Java: sudo apt install openjdk-11-jdk -y
3. Add Jenkins repo key and repo
4. Update package index again
5. Install Jenkins: sudo apt install jenkins -y
6. Start and enable Jenkins service
Key: Java must be installed first; repo must be added before Jenkins install.
Full Transcript
To install Jenkins on Linux, first update the package index to get the latest package info. Then install Java, which Jenkins needs to run. Next, add the Jenkins repository key and repository to your system so apt can find Jenkins packages. Update the package index again to include Jenkins packages. Install Jenkins using apt. Finally, start the Jenkins service and enable it to start automatically on boot. Check the service status to confirm Jenkins is running. This process ensures Jenkins is properly installed and ready to use.