How to Install Jenkins on Ubuntu 16.04, in few simple steps. Jenkins is a simple, free and open-source Continuous Integration tool (CI), which is is one of the most popular application development practices in recent times. Jenkins is widely used for building, deploying and automating any project, providing hundreds of different plugins. It supports version control tools, including AccuRev, Subversion, Git, CVS, Perforce, ClearCase, Mercurial, and RTC, and can execute Apache Ant, Apache Maven and sbt based projects as well as arbitrary shell scripts. Installing Jenkins on an Ubuntu 16.04, is an easy task if you carefully follow the steps bellow.
1. Jenkings Features:
Jenkins comes with the following features out of the box, and many more can be easily added through plugins:
- Easy and fast installation
- Easy configuration
- Continuous Integration and Continuous Delivery
- Rich plugin ecosystem
- Distributed builds
In this tutorial we will guide you through the process of installing Jenkins on Ubuntu 16.04.
2. Update the system
Login to your Ubuntu 16.04 via SSH as user root
ssh root@IP_Address -p Port_number
It is highly recommended to regularly update your server. Run the below given command to update all installed packages
apt-get upgrade && apt-get upgrade
3. Install Jenkins on Ubuntu 16.04
Run the following command to add Jenkins key to the server
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add - OK
Once you add the key, add the Jenkins repository too
echo 'deb https://pkg.jenkins.io/debian-stable binary/' | tee -a /etc/apt/sources.list
Update the repositories
On Debian based distros such as Ubuntu, Jenkins can be installed through the ‘apt-get’ package manager. It will install Jenkins, Java version 8 and all necessary dependencies.
apt-get install jenkins
4. Start Jenkins on Ubuntu 16.04
Once Jenkins is installed, start Jenkins
systemctl start jenkins
And check its status by running the following command
systemctl status jenkins
If everything is OK, you should receive an output similar to the following
● jenkins.service - LSB: Start Jenkins at boot time Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled) Active: active (exited) since Wed 2017-09-13 10:35:57 CDT; 15s ago Docs: man:systemd-sysv-generator(8)
5. Login to Jenkins
Jenkins by default is listening on port 8080, so open your favorite web browser and navigate it to
http://IP_Address:8080 to access Jenkins. The first screen will prompt you to enter and administrative password. For security reasons Jenkins creates this password and stores it to the log file and the ‘/var/lib/jenkins/secrets/initialAdminPassword’ file.
Run the following command to show the password
cat /var/lib/jenkins/secrets/initialAdminPassword 56cf3d2095804755b46437f5e1e9d16b
Copy the password, enter it in the browser and click ‘Continue’. In the next steps you can install the plugins recommended by Jenkins or select just the plugins you need, create your first admin user, and that’s all. You can start using Jenkins for your projects.
In case you are curious to know more about Jenkins, its installation, configuration and usage, please check their official documentation.
If you use one of our Managed Hosting services, you don’t have to Install Jenkins on Ubuntu 16.04 yourself, you can simply ask our expert Linux admins to install Jenkins on Ubuntu 16.04 for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on How to Install Jenkins on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.