- Install Java
$ sudo apt update
$ sudo apt install openjdk-8-jdk
- 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'
- Install Jenkins
$ sudo apt update && sudo apt install jenkins
- 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
$ 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)
open http://your_ip_or_domain:8080 on browser.
$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword