
Setting up Jenkins on Ubuntu 24.04 LTS provides a robust platform for automation and CI/CD workflows. This process involves adding the Jenkins repository to your system, installing the necessary packages, and performing initial configuration via the web interface.
Before you begin, ensure your system is up-to-date. A clean installation typically requires a minimum of 256MB RAM and 1GB of drive space, though significantly more is recommended for production use, especially for builds. You will also need a Java Development Kit (JDK) installed. OpenJDK is the recommended option.
The installation begins by adding the Jenkins repository key to your system’s keyring. This is a crucial security step to verify the integrity of the packages you download. Next, you add the Jenkins repository definition to your system’s package sources list. After adding the repository, update your local package index using the appropriate command. This ensures your system knows about the new packages available in the Jenkins repository.
With the index updated, you can now proceed to install the Jenkins package. This command downloads and installs Jenkins and its dependencies. Once the installation is complete, the Jenkins service is automatically started. You can verify its status to ensure it is running correctly.
By default, Jenkins runs on port 8080. If you have a firewall (like ufw) enabled, you’ll need to open this port to access the web interface from a remote machine. Allowing traffic on port 8080 is essential for accessing the Jenkins setup wizard.
To complete the initial setup, open your web browser and navigate to your server’s IP address or hostname followed by :8080
. You will be prompted to enter an initial administrator password. This password is generated during the installation and can be found in a specific file on the server. You will need to retrieve this initial password and paste it into the browser to unlock Jenkins.
After unlocking, Jenkins will guide you through the setup wizard. The next step is typically to install plugins. You can choose to install suggested plugins or select specific plugins manually. Plugins extend Jenkins functionality for building, deploying, and automating projects. Finally, you will be asked to create an initial admin user. This is your first admin account to manage Jenkins.
Following these steps ensures a successful installation and initial configuration of Jenkins on your Ubuntu 24.04 LTS system, setting the stage for powerful CI/CD pipelines and build automation.
Source: https://www.fosstechnix.com/how-to-install-jenkins-on-ubuntu-24-04-lts/