Skip to content

Instantly share code, notes, and snippets.

@afahitech
Created October 13, 2021 17:14
Show Gist options
  • Save afahitech/d4624aab48f3541cf125622a1e84ca21 to your computer and use it in GitHub Desktop.
Save afahitech/d4624aab48f3541cf125622a1e84ca21 to your computer and use it in GitHub Desktop.
How to install Jenkins on Ubuntu 20.04 LTD
#!/bin/sh
sudo apt update
sudo apt install openjdk-11-jdk
java -version
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'
sudo apt update
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9B7D32F2D50582E6
systemctl status jenkins
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9B7D32F2D50582E6
sudo apt install jenkins
systemctl status jenkins
sudo ufw allow proto tcp from 192.168.121.0/24 to any port 8080
sudo ufw allow 8080
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