DEV Community

Harrsh Patel
Harrsh Patel

Posted on

Install Jenkins on Ubuntu server

Part 1 - Download and install Jenkins

wget -q -O - https://pkg.jenkins.io/debian-stable/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 install jenkins
Enter fullscreen mode Exit fullscreen mode

Part 2 - Starting Jenkins

sudo systemctl start jenkins

sudo systemctl status jenkins
Enter fullscreen mode Exit fullscreen mode

Part 3 - Opening the Firewall

sudo ufw enable

sudo ufw allow OpenSSH

sudo ufw allow 8080
Enter fullscreen mode Exit fullscreen mode
  • Check the UFW status via,
sudo ufw status
Enter fullscreen mode Exit fullscreen mode

Part 4 - Setting Up Jenkins

  • Open the url :8080 in your browser.

  • Get the unlocking password from,

sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Enter fullscreen mode Exit fullscreen mode
  • Click the Install suggested plugins option.

  • Set-up the admin user.

  • Assign the url :8080 in the Instance Configuration page.

  • Save the details and the Jenkins is set on the server.

Top comments (0)