For example, I will install Jenkins on Ubuntu 20.04
Let’s add a key to the system:
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
Let’s add the Jenkins repository:
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
sudo apt-get update
Install Jenkins from the added repository:
sudo apt-get install fontconfig openjdk-11-jre
sudo apt-get install jenkins
After installation, some options will be in /etc/default/jenkins.
Check if the process is running:
sudo systemctl status jenkins
sudo systemctl restart jenkins
Open the web interface, for example http://ixnfo.com:8080
Let’s see the generated password for the admin user:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Next, select “Install suggested plugins”, in the next step, create a new user or keep the existing “admin”.