web123456

ubuntu 22 install jetKins

1. As a Java application,JenkinsRequire Java 8 and higher to check whether Java is installed on the system

Check ifInstall java

java --version
  • 1

Install java

sudo apt install -y openjdk-17-jre-headless
  • 1

2. Install Jenkins through the official repository

Import Jenkins GPG keys from Jenkins repository
Add the Jenkins repository to the source list file

curl -fsSL /debian/ | sudo tee \
  /usr/share/keyrings/ > /dev/null
echo deb [signed-by=/usr/share/keyrings/] \
  /debian binary/ | sudo tee \
  /etc/apt// > /dev/null
  • 1
  • 2
  • 3
  • 4
  • 5

Update apt

sudo apt update
  • 1

3. Install jenkins

sudo apt install jenkins
  • 1

4. Check whether it starts

systemctl status jenkins
  • 1

The systemctl command starts or stops

5. Enter jetkins
http://server-IP:8080

6. Check the password

sudo cat /var/lib/jenkins/secrets/initialAdminPassword
  • 1