Skip to content

Instructions for Setting Up Jenkins on Ubuntu Version 24.04

"Discover the process of setting up Jenkins on Ubuntu 24.04 for seamless continuous integration and delivery. Dive into our comprehensive, swift guide to launch right away."

Instructions for Setting Up Jenkins on Ubuntu Release 24.04
Instructions for Setting Up Jenkins on Ubuntu Release 24.04

Instructions for Setting Up Jenkins on Ubuntu Version 24.04

Ubuntu 24.04 LTS offers a modern, stable, and secure platform for running Jenkins, a popular open-source automation server designed for continuous integration (CI) and continuous delivery (CD) of software projects. This article provides a step-by-step guide to installing and configuring Jenkins on Ubuntu 24.04.

**Prerequisites**

Before you begin, ensure you have Ubuntu 24.04 installed on your physical hardware, virtual machine, or cloud instance, and that you have `sudo` privileges. Jenkins requires Java, with OpenJDK 17 recommended.

**Install Java**

To install OpenJDK 17, run the following commands:

```bash sudo apt update sudo apt install openjdk-17-jdk -y java --version ```

**Add Jenkins Repository and Key**

Jenkins is not in the default Ubuntu repositories. To add the official Jenkins repository, run the following commands:

```bash wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian binary/" | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null sudo apt update ```

**Install Jenkins**

Install the latest stable Jenkins package from the newly added repository by running:

```bash sudo apt install jenkins -y ```

**Start and Enable Jenkins Service**

Jenkins runs as a service managed by systemd. Start the service and enable it to start automatically on system boot:

```bash sudo systemctl start jenkins sudo systemctl enable jenkins sudo systemctl status jenkins # To verify it is running ```

**Adjust Firewall and Security Groups (if applicable)**

By default, Jenkins listens on port 8080. Make sure port 8080 is open in your firewall or cloud security group. For example, to allow port 8080 via UFW firewall:

```bash sudo ufw allow 8080 sudo ufw reload ```

**Access Jenkins Web Interface**

Open a browser and navigate to:

``` http://your-server-ip-or-domain:8080 ```

**Unlock Jenkins**

On first access, Jenkins requires an initial admin password from the server. Retrieve the password using:

```bash sudo cat /var/lib/jenkins/secrets/initialAdminPassword ```

Copy and paste this password into the Jenkins setup page.

**Customize Jenkins Setup**

- Choose **Install Suggested Plugins** to get a default set of useful plugins. - Create the first admin user with username and password. - Save the credentials and start using Jenkins.

**Post-Installation Plugin Management**

Go to **Manage Jenkins > Manage Plugins** to install any additional plugins you need, such as the Amazon EC2 plugin if integrating with AWS.

Following these steps will get Jenkins up and running on Ubuntu 24.04 LTS, based on Jenkins official repository installation, Java dependency, service management, and initial configuration via the web UI. For further customization or cloud integration, Jenkins plugins and configuration can be done through the web interface after installation.

For a smooth and efficient Jenkins installation experience, consider using Shape.Host Cloud VPS, offering ultra-fast SSD performance, global server locations, full root access, and instant provisioning with Ubuntu 24.04 support.

[1] [2] [3] [4]

Data-and-cloud-computing makes it easier to manage and scale Jenkins instances in the cloud, while technology such as systemd simplifies the handling of Jenkins as a service on Ubuntu 24.04 LTS.

The configuration and management of Jenkins plugins, including the Amazon EC2 plugin for AWS integration, can be done via the web interface, demonstrating the user-friendly technology employed by Jenkins.

Read also:

    Latest