What is Jenkins ?
Jenkins is an open source automation server which is used for continuous integration and continuous delivery in software development its help to automate the parts of software development related like building , testing, deploying and delivery the software
how you can install Jenkins on Ubuntu:
Step 1:
You need to read documentation of Jenkins that what are the minimum requirement for installing Jenkins
documentation link : https://www.jenkins.io/doc/book/installing/linux/
The point that are being in the knowledge.
- Which java version is required for which jenkins version first install that version of java
(source: Jenkins Documentation)
Step 2:
First Update your System:
sudo apt update
Step 3;
install Java as per the requirement of Jenkins version
observe the picture
(source: Jenkins Documentation)
sudo apt install openjdk-21-jre-headless
Step 4:
Now follow the documentation command
(source: Jenkins Documentation)
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
Step 5:
update it again
sudo apt-get update
Step 6:
Install Jenkins
sudo apt-get install jenkins
Step 7:
enable means start the service when machine is rebooted
sudo systemctl enable jenkins
Step 8:
sudo systemctl start jenkins
Now
Jenkins is install so open it with port 8080
and the password is at
/var/lib/jenkins/secrets/initialAdminPassword
it's mention in the browser
So use Cmd
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
copy the password and paste it there in browser
and configure the setting that you need.
Script For Provisioning in cloud
#!/bin/bash
sudo apt update
sudo apt install openjdk-21-jre-headless -y
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins -y
sudo systemctl enable jenkins
sudo systemctl start jenkins
Thanks
Top comments (0)