Setting up Jenkins Master

 

 

Setup  Jenkins Master

#updating the system
sudo apt-get update -y && sudo apt-get upgrade -y

Incase it prompts, please press ok using keyboard

. Install the applications: wget, unzip and java (openjdk-11-jdk)

apt-get install -y wget unzip openjdk-11-jdk

This is the Debian package repository of Jenkins to automate installation and upgrade. To use this repository, first add the key to your system:


  curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
    /usr/share/keyrings/jenkins-keyring.asc > /dev/null

Then add a Jenkins apt repository entry:


  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

 

Update your local package index, then finally install Jenkins:


  sudo apt-get update
  sudo apt-get install fontconfig openjdk-11-jre
  sudo apt-get install jenkins
   

 

note down the password

 cat /root/.jenkins/secrets/initialAdminPassword

Open a web browser to log into the Jenkins interface. Use the Jenkins Master IP Address, port 8080 :example  http://192.168.40.131:8080

. Click ‘Install Suggested Plugins

When prompted, create a new user using:

username: admin
password: pass@word1
The email address you use for this user is irrelevant (you can use 'admin@localhost'

Done with setup