Jenkins is pretty versatile. It can be installed as a standalone app, a Java servlet container such as Apache Tomcat, or run as a Docker container. It’s a leading open-source automation server that provides hundreds of plugins to support building, deploying, and automating any project. Out of the box, it supports Windows, Mac OS X, and other Unix-like operating systems. and can easily be distributed across multiple machines, helping drive builds, tests, and deployments for multiple platforms efficiently. For more about Jenkins, connect to its homepage. When you’re ready to install Jenkins, follow the steps below: When you’re ready to install Jenkins, follow the steps below:

How to install Java on Ubuntu Linux

Jenkins requires Java JDK to be installed to function. You can either install Oracle Java JDK or its open-source alternative called OpenJDK. For a more detailed installation of Java, read our post here. You can also run the commands below to install the default OpenJDK on Ubuntu. Once the OpenJDK is installed, verify it by checking the Java version: The command should output something similar to the lines below: Java should be installed and ready to use

How to add Jenkins repository on Ubuntu

Installing Jenkins on Ubuntu Linux is relatively straightforward. Jenkins has its repository for Linux systems. Run the commands below to import the GPG keys of the Jenkins repository using the following wget command. Then run the commands below to add the package repository. The commands above should enable the Jenkins repository on Ubuntu. All you have to do now is install Jenkins.

How to install Jenkins on Ubuntu Linux

Now that Jenkins’ repository has been added to Ubuntu, run the commands below to install Jenkins. After installing, Jenkins service will automatically start after the installation process is complete. To verify if Jenkins is installed and running, run the commands below: You should see an output similar to the one below: The commands below can also be used to start, stop and enable Jenkins service to automatically start when the system boots.

How to set up Jenkins on Ubuntu

To set up your new Jenkins installation, open your browser, type the server hostname or IP address followed by port 8080, http://hostname:8080, and a screen similar to the following will be displayed: http://localhost:8080 You will be prompted for an administrator password. To get the password, run the commands below from the Ubuntu terminal. That should display the password to use. Copy and paste it into the box and continue. On the next screen, you’ll be prompted whether to install suggested plugins or select plugins to install. For simplicity’s sake, Click on the Install suggested plugins box, and the installation process will start immediately. Wait for the suggested plugins to install. After that, create the first admin user account and click Save and Continue. Jenkins instance URL should automatically be populated. Accept the default or change to the server hostname or domain name and save. then finish. That should complete Jenkins’ installation. Click Start using the Jenkins button and the setup should automatically sign you into the backend. That should do it! Conclusion: This post showed you how to install Jenkins on Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.