Jenkins is an automation server and continuous integration tool. It provides a number of plugins for building deployments and automation for your applications. You can use Jenkins as a simple CI (Continuous Integration) server or configure this for the CD (Continuous Delivery) hub for any number of the projects. With the help of Jenkins, you can easily distribute work across multiple machines, helping drive builds, tests and deployments across multiple platforms faster.
This tutorial will guide you to install Jenkins on Ubuntu 16.04 LTS & 14.04 LTS. This also helps you with the basic help about creating a user and install plugins in Jenkins. Let’s go through the tutorial to install Jenkins on an Ubuntu system.
Step 1 – Add Jenkins PPA
Jenkins team provides official repositories for package management for the popular operating system for installing Jenkins on a Linux VPS. Use below commands to enable Jenkins PPA on your Ubuntu system. This repository contains required packages to install Jenkins on Ubuntu Linux.
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
Step 2 – Install Jenkins on Ubuntu
Update the apt-get cache before installing Jenkins on Ubuntu. After that, you can install Jenkins on an Ubuntu system by running below commands.
sudo apt-get update sudo apt-get install jenkins
After installation of Jenkins on Linux server. The default Jenkins run on port 8080. If your server already has other services share the same port like Tomcat. You can edit /etc/default/jenkins configuration file and update HTTP_PORT value to 8081 or something else..
and restarted Jenkins service after making changes
sudo service jenkins restart
Step 3 – Access Jenkins Web Interface
Access your server on port 8080 (Or updated port) in your favorite web browser. The default installation password can be found at /var/lib/jenkins/secrets/initialAdminPassword as showing in below image.
Now select appropriate option to install the plugin. You can choose to install suggested plugins or select required plugins options.
Now create an admin account for your Jenkins setup. This will be required to log in to Jenkins.
After successful completion of Jenkins setup wizard, You will be redirected to Jenkins dashboard.
Step 4 – Install Plugins in Jenkins
Login to Jenkins dashboard and navigate to Manage Jenkins >> Manage Plugins >> Available Tab and select the plugins to install.
To update existing installed plugins in Jenkins Manage Jenkins >> Manage Plugins >> Update Tab
Step 5 – Create Users in Jenkins
To create users in Jenkins login to Jenkins admin panel and navigate to Manage Jenkins >> Manage Users >> Create User . Enter the required details and click Create User.