How to Install Jenkins on Ubuntu
Jenkins is an open source framework for continuous integration, continuous deployment and test automation. In the previous blog, we showed a step by step explanation of how to install Jenkins on Windows. But that blog post doesn’t cover Ubuntu users. So this time, we will learn to install Jenkins on Ubuntu.
First, install JDK. Jenkins supports Java 8. If you don’t know how to install Java, look at this blog. Now that Java is installed, we can proceed with Jenkins.
1. Add the repository key to the system with the following command. The command will download the Jenkins key file and add it to the system. This key is required on Ubuntu so that it can authenticate packages being downloaded from the Jenkins repository server.
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
2. Append the debian package repository address to the server's sources.list through the command:
echo deb https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
3. Next, run the command sudo apt-get update to make sure we are getting the latest updates.
4. Install Jenkins through the command sudo apt-get install jenkins
5. Start the Jenkins server through the command sudo systemctl start Jenkins
6. Verify Jenkins is active through the command sudo systemctl status Jenkins
7. Go to the Jenkins page by pasting the URL http://localhost:8080 in your browser.
8. To unlock Jenkins, copy the password from the file /var/lib/jenkins/secrets/initialAdminPassword, paste in the Administrator password field and click on the “Continue” button.
9. Select the plugins you want to install. Jenkins recommends you install a certain set of plugins that is regularly used in most cases. Choose them or customize the plugins you want to install. In this example, we will install the suggested plugins.
10. The plugins are installed immediately. Wait until all plugins successfully installed.
11. Create an admin user for Jenkins and click “Save and Continue”.
12. Click “Save and Finish” to complete the Jenkins installation.
13. Click on “Start using Jenkins” to access the default Jenkins page.
14. If everything is ok, you will get to a page that looks like this:
Congratulations! You can now start with Jenkins! Thank you for reading!
To learn how to use Jenkins, check out these resources:
- The Continuous Testing academy
- 2 Ways to Integrate JMeter Tests into Jenkins
- How to Include Load Testing in your Continuous Integration Environment
- Are You Using Jenkins the Right Way?
- Running a JMeter Test via the Jenkins Pipeline - A Tutorial
- BlazeMeter’s Jenkins Plugin
Whatever you do with Jenkins, make sure you add your performance tests to the CI cycle. To try out performance testing with BlazeMeter, request a live demo from our performance engineers. Or put your URL in the box below and your test will start in minutes.