How to Install Jenkins on Ubuntu
In this tutorial we will learn to install Jenkins on Ubuntu.
Jenkins is a very popular Open Source software that helps us to automate not only the build-deployment process but also an entire project. Jenkins supports hundreds of plugins that help us to automate a project.
Also Read : Easy Way to Install Nagios Monitoring Tool on AWS
&& How to create your first build Job in Jenkins
Install Prerequisites and Jenkins
Install Java on your Ubuntu Machine.
$ sudo apt-get install openjdk-8-jdk -y
Add repository key to the System.
$ wget -q -O – https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add –
Add the repository address to the Sources.list.
$ sudo sh -c ‘echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list’
Update the system.
$ sudo apt-get update
$ sudo apt-get install jenkins -y
Start Jenkins Service and check the status
Start the Jenkins Service
$ sudo service jenkins start
Check the status
$ sudo sevice jeinkins status
Configure System Firewall
Allow port 8080 to the System Firewall
$ sudo ufw allow 8080
Check Firewall status
$ sudo ufw status
If firewall in inactive , enable it and check the status again.
$ sudo ufw enable
$ sudo ufw status
Check IP address of your Ubuntu Box
$ ip add
Note down the IP address from the above command and put the following URL in the browser to access Jenkins.
Note: If you want to access the Jenkins Server publicly , attach a public IP to your Ubuntu Box and put the public IP in the URL.
Use following command to get the Initial Password
$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Put the Initial Password and you will redirect to following page.Install the suggested Plugins.
The Following prompt will appear.
Create First Admin User
Create an user and note down the credential as it will be the only user to login into Jenkins now. Initial Password is used only one time. However, you can create multiple users after login into Jenkins.
Note down the Jenkins URL
After restart , the login screen will appear. Put your credential and login into the Jenkins.
I hope you enjoyed this tutorial and learned how to Install Jenkins on Ubuntu. If you think this is really helpful, please do share this article to others as well. Please also share your valuable feedback, comment or any query in the comment box.I will really happy to resolve your queries.
If you think we helped you or just want to support us, please consider these:-
Connect to us: Facebook | Twitter