How to Install Jenkins on Ubuntu 24.04

This article provides a step-by-step guide to installing Jenkins on Ubuntu 24.04. Jenkins is a CI/CD automation server that reduces manual tasks in software development. Key steps include installing OpenJDK, adding the Jenkins repository, running installation commands, and configuring access through a web portal for enhanced development workflows.

This article explains how to install Jenkins on Ubuntu 24.04.

Jenkins is an open-source automation server for continuous integration and delivery (CI/CD). It automates repetitive tasks in the software development process, like code compilation, testing, and deployment, reducing manual effort and the potential for errors.

With an extensive library of plugins, it seamlessly integrates with various development, testing, and deployment tools, giving you the flexibility and customization you need to build your workflow.

Install OpenJDK

Jenkins relies on Java to work. If you don’t already have OpenJDK installed, read the post below to install it.

Install OpenJDK on Ubuntu

Once OpenJDK is installed, continue below to get Jenkins on Ubuntu.

Install Jenkins

Jenkins packages are not available in the Ubuntu default repositories. You must add the package repository to install from.

Run the command below to add Jenkins repository GPG key.

curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc

Then add the 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

Once added, run the command below to install Jenkins.

sudo apt update
sudo apt install jenkins

After installing Jenkins, its default configuration file is at [/etc/default/jenkins]. Make changes in there as you wish.

Save and exit. Then, restart Jenkins.

sudo systemctl restart jenkins

Access Jenkins portal

Once Jenkins is installed, you can access its portal using the server’s IP address or hostname followed by port 8080.

http://srv1.example.com:8080

When prompted for the Administrator password, find it at [/var/lib/jenkins/secrets/initialAdminPassword]. Copy and paste it into the box and continue.

Install suggested plugins.

Wait for suggested plugins to be installed.

Create an administrator username and password.

Save and finish the installation wizard.

Jenkins should be ready to use.

That should do it!

Conclusion:

Installing Jenkins on Ubuntu 24.04 is straightforward and enhances your software development process through automation. Here are the key takeaways:

  • Open-source Automation: Jenkins is a powerful tool for continuous integration and continuous delivery (CI/CD).
  • Java Dependency: Ensure OpenJDK is installed, as Jenkins requires it to function correctly.
  • Adding Repositories: Use the provided commands to add the Jenkins repository and install it via the terminal.
  • Accessing Jenkins: Access Jenkins through the server’s IP address at port 8080.
  • Setup: Follow the installation wizard to configure Jenkins and set up an administrator account.
  • Plugin Installation: Leverage suggested plugins for enhanced functionality and integration with other tools.

With Jenkins up and running, you can improve your development workflow and streamline your processes effectively!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *