How to Install and Configure Jenkins 2.0 – Getting Started

Jenkins 2.0 has lots of great functionalities that will make the CI pipeline really smooth. One of such example is the DSL based build pipeline. In this guide, i will walk you through the steps for installing and configuring a Jenkins 2 server on a ubuntu 14.04 box.

Install and Configure Jenkins 2.0

Follow the steps given below to install and configure Jenkins 2 on a ubuntu server.

Note: We are doing this installation on a Vagrant Ubuntu 14.04 box.

Note: Centos/Rehat users follow this tutorial Install jenkins 2 on centos/Redhat

1. Log in to the server and update it.

2. Install java

3. Head over to http://pkg.jenkins-ci.org/debian/ and get the download link for Jenkins 2 Ubuntu version and download it using wget command.

4. Install the package

If you face any dependency error while installing the package, you need to execute the following command to rectify it.

5. To add Jenkins to the boot menu, open /etc/rc.local file and add the following to the file.

Now you will be able to access the Jenkins server on port 8080 from localhost or using the IP address as shown below.

Install and Configure Jenkins 2.0

6. As you can see the above image, you need to provide the administrative password. You can get the password using the following command.

Copy the password and click continue.

READ  Git Basics Every Developer and Administrator Should Know

7. Next, you will be asked to configure plugins as shown below. Select “Install Suggested Plugins” option. This will install all the required plugins for building your projects. It will take few minutes to install the plugins.

Jenkins 2.0 plugin configuration

8. Once installed, You need to create a user with password and click “save and finish”

Jenkins 2.0 user configuration

9. Click “Start Using Jenkins” and it will take you to the Jenkins Dashboard. Log in using the username and password that you have given in step 8.

10. If you want to build java maven project, you need to install maven using the following command.

That’s it! Now you have a fully functional Jenkins 2.0 server up and running. Next, would be the configuration of distributed setup wherein you will have a active master and slaves for building the projects.

If you are a docker user, you can Configure Jenkins 2.0 using the following commands.

Free DevOps Resources

Get DevOps news, tutorials and resources in your inbox. A perfect way If you want to get started with devops. Like you, we dont like spam.