Skip to content

Instantly share code, notes, and snippets.

@chankruze
Last active February 18, 2022 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chankruze/1101d8cd48c09e6d168b02b53ccd4ad0 to your computer and use it in GitHub Desktop.
Save chankruze/1101d8cd48c09e6d168b02b53ccd4ad0 to your computer and use it in GitHub Desktop.

Installing Jenkins

  1. Install Java
$ sudo apt update
$ sudo apt install openjdk-8-jdk
  1. Add the Jenkins Debian repository
$ wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
$ sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
  1. Install Jenkins
$ sudo apt update && sudo apt install jenkins
  1. Verify Jenkins
$ systemctl status jenkins

sample output:

● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: active (exited) since Wed 2018-08-22 13:03:08 PDT; 2min 16s ago
    Docs: man:systemd-sysv-generator(8)
    Tasks: 0 (limit: 2319)
CGroup: /system.slice/jenkins.service

Adjusting Firewall

$ sudo ufw allow 8080
$ sudo ufw status
  • sample output:
Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
8080                       ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
8080 (v6)                  ALLOW       Anywhere (v6)

Setting Up Jenkins

open http://your_ip_or_domain:8080 on browser.

$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment