Install Jenkins on Ubuntu

Jenkins is a tool that makes it easy to build source code for software projects. In this tutorial, I will guide you to install Jenkins on Ubuntu and will have some instructions about it in the incoming tutorials.

To install Jenkins, you need to install Java first. With the current version of Jenkins, we need to install Java 7 or above.

Here, I installed Java 8 as follows:

Install Jenkins on Ubuntu

OK, let’s start installing Jenkins now!

  • First, run the following two commands to add the key:

and source list:

of Jenkins into apt command.

  • Then, run the following command to update the apt cache:

  • Finally, run the following command to install Jenkins.

Once installed, Jenkins will run underneath the system.

Its jenkins.log file is also created in the /var/log/jenkins/directory. You can check this log file if there is a problem with Jenkins.

By default, Jenkins will run on port 8080. You can access Jenkins with the following URL:

Result:

Install Jenkins on Ubuntu

As you can see, we need to unlock Jenkins as instructed above. It provides us with a password contained in the jenkins.log file and in /var/lib/jenkins/secrets/initialAdminPassword to unlock. Please copy this password and paste into the Administrator password box and then click the Continue button.

Install Jenkins on Ubuntu

At this point, choose Install suggested plugins to Jenkins install the common plugins that we often use.

Install Jenkins on Ubuntu

After installing the plugins, Jenkins will ask you to setup the administrator account as follows:

Install Jenkins on Ubuntu

Please fill the appropriate information of you and then click Save and Finish.

Install Jenkins on Ubuntu

Click on Start using Jenkins to enter Jenkins main window.

Result:

Install Jenkins on Ubuntu

At this point, we have finished installing Jenkins on Ubuntu! Currently, the Jenkins version is 2.31.

 

Add Comment