Step by Step Guide to Installing Jenkins on Ubuntu 22.04
Introduction: What is Jenkins and Why You Should Install it on Ubuntu 22.04
Below is a list of items that may be needed to complete this tutorial successfully:
1) A cloud-hosted instance or self-hosted server running Linux Ubuntu 20.04 LTS
2) A fully qualified domain name
3) A public static IP address
4) An SSH client such as Putty or the macOS terminal app
Below is an overview of the steps covered in this tutorial:
1) Open an SSH connection to the Ubuntu server and update the system repository
2) Install OpenJDK and install Jenkins
3) Configure your system firewall to allow Jenkins
4) Open the Jenkins dashboard and create a user.
1. Open an SSH connection to the Ubuntu Server and update the system repository
The first step in completing this setup is to open an SSH connection to your Ubuntu server. If you are using a macOS device, open the terminal app and run the command below to connect to your server:
If you use a Windows-based device, download and install the Putty SSH client. Open Putty and enter the IP address of your Ubuntu server on the IP address (or hostname field), ensure that Port is set to 22, and click Connect. Once you have connected to the server, run the command below to set a custom hostname
2. Install OpenJDK and install Jenkins
You have completed the basic server configuration and the next step is to install OpenJDK. Run the command below to install Java Development Kit version 11
The version of Jenkins that is included in the official Ubuntu repository may not be the latest version. To get the latest version of Jenkins, run the command below to add the Jenkins repository
Add the Jenkins software repository to the sources.list.d directory and specify the authentication key
3. Configure your system firewall to allow Jenkins
4. Open the Jenkins dashboard and create a user
If you have reached this step, then you have successfully installed Jenkins. The next step is to access the Jenkins dashboard, complete the post-installation setup and create a user. Open a new browser window and navigate to https://your_server_ip_address_or_domain_name:8080. You will see a page Labeled Unlock Jenkins. You will also see a field that requires you to enter the Administrator password
But What is the password? Note that for security reasons, the default password for accessing Jenkins is stored in a log file named initialAdminPassword. Run the command below to cat this file to reveal the password
The Customize Jenkins page will be displayed. Click Install Suggested Plugins which will automatically install the most important plugins for Jenkins. A getting started page will be displayed and show a progress bar indicating the installation progress.
On the instance configuration page, enter the URL pointing to the server i.e https://your_domain_name_or_ip_address:8080 then click Save and finish. A message will be displayed notifying you that Jenkins is ready. Click the Start using Jenkins button to access the dashboard
Jenkins Frequently Asked Questions
What is Continuous Integration in Jenkins?
What is the difference between Hudson and Jenkins?
Hudson and Jenkins are two of the most popular continuous integration tools used in software development. While both tools are designed to help developers automate their build and deployment process, there are some key differences between them.
The main difference is that Hudson is an open-source project while Jenkins is a fork of Hudson. This means that while Jenkins has the same core features as Hudson, it also has additional features such as more plugins, better user interface and support for distributed builds. Additionally, Jenkins also has a larger user base than Hudson.
What is Groovy in Jenkins?
Which command is used to start Jenkins?
What is Jenkinsfile?
At this point you have successfully installed Jenkins on a Linux Ubuntu 22.04 LTS server. Kindly refer to the Jenkins support page for details about managing and using Jenkins for various tasks.Click HERE to visit our Youtube channel or go to the home page to browser for more tutorials and guides. We hope that this tutorial has been informative and would like to thank you for reading it