Install Jenkins on Ubuntu
Jenkins is an open source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery.
Jenkins is a Java Application. So you need to install JRE (Java Runtime Environment). Install it with
sudo apt-get install default-jre
You can find instructions for installing Jenkins on Debian/Ubuntu at
https://pkg.jenkins.io/debian-stable/
Install Jenkins
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' sudo apt-get update sudo apt-get install jenkins
Enable Jenkins to start on boot
sudo systemctl enable jenkins
Start Jenkins
sudo systemctl start jenkins
To check status
sudo systemctl status jenkins
You can verify Jenkins running on port 8080 with command
root@jenkins:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 186/systemd-resolve tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 256/sshd: /usr/sbin tcp6 0 0 :::22 :::* LISTEN 256/sshd: /usr/sbin tcp6 0 0 :::8080 :::* LISTEN 4774/java root@jenkins:~#
To find the initial password, run the command
cat /var/lib/jenkins/secrets/initialAdminPassword