Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How To Install Jenkins on Ubuntu 20.04/18.04 - DesignLinux

Apr 16 2021
designlinux 0 Comments

Jenkins is a leading self-contained open-source automation server that is used to automate repetitive technical assignments involved in building, testing, and delivering or deploying software.

Jenkins is Java-based and can be installed through Ubuntu packages, Docker, or by downloading and running its web application archive (WAR) file that includes all the contents of a web application to run on a server.

In this article, you will learn how to use the Debian package repository to install Jenkins on Ubuntu 20.04 and Ubuntu 18.04 with the apt package manager.

Prerequisites

  • Minimum 1 GB of RAM for a small team and 4 GB+ of RAM for production-level Jenkins installation.
  • Oracle JDK 11 installed, following our tutorial on installing OpenJDK on Ubuntu 20.04/18.04.

Installing Jenkins on Ubuntu

On Ubuntu, you can install Jenkins from the default repositories through apt but the included version often behind the latest available version.

To take advantage of the most recent stable version of Jenkins features and fixes, use the project-maintained packages to install it as shown.

$ 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-get update
$ sudo apt-get install jenkins
Install Jenkins on Ubuntu Server
Install Jenkins on Ubuntu Server

Once Jenkins and its dependencies are installed on the system, you can start, enable, and check the status of the Jenkins server using systemctl commands.

$ sudo systemctl start jenkins
$ sudo systemctl enable jenkins
$ sudo systemctl status jenkins
Check Jenkins Status on Ubuntu Server
Check Jenkins Status on Ubuntu Server

Next, you need to open the default Jenkins port 8080 on ufw firewall as shown.

$ sudo ufw allow 8080
$ sudo ufw status
Open Jenkins Port on UFW Firewall
Open Jenkins Port on UFW Firewall

Now that Jenkins installed and our firewall configured, we can finish the initial setup via the web browser.

Setting Up Jenkins on Ubuntu

To complete Jenkins installation, visit the Jenkins setup page on its default port 8080 at the following address.

http://your_server_ip_or_domain:8080

You should see the Unlock Jenkins screen, that shows the location of the initial password:

Unlock Jenkins
Unlock Jenkins

Now run the following cat command to view the password:

$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Jenkins Password
Jenkins Password

Next, copy this 32-character password and paste it into the Administrator password field, then click Continue.

Jenkins Admin Password
Jenkins Admin Password

Next, you will get Customize Jenkins section, here you will get the option of installing suggested plugins or selecting specific plugins. We will choose the Install suggested plugins option, which will immediately start the installation process.

Jenkins Installation Process
Jenkins Installation Process

Once the Jenkins installation is finished, you will be asked to create a first administrative user. You can skip this step and continue as admin to use the initial password that we set above.

Create Jenkins User
Create Jenkins User
Finish Jenkins Setup
Finish Jenkins Setup
Jenkins Dashboard
Jenkins Dashboard

At this point, you have successfully completed the installation of Jenkins.

Conclusion

In this article, you have learned how to install and set up Jenkins using the project-provided packages on the Ubuntu server. Now you can start exploring Jenkins from the dashboard.

Related

Tags: Ubuntu Tips

How To Install Java with Apt on Ubuntu 20.04

Prev Post

LFCA: Learn Classes of Network IP Addressing Range – Part 11

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 1
  • 88
  • 605,838

DesignLinux.com © All rights reserved

Go to mobile version