How to install Jenkins on your Linux server
In this manual, we will show you how to install Jenkins on your own Server. This way, you can have your own CI/CD pipelines in a fully private environment.
info This manual has been created and tested successfully on Ubuntu 18.04. It is possible that for other distributions or versions, the steps may change. All instructions in this manual assume that superuser privileges are available, which are essential to correctly complete all steps.
Jenkins Installation
1. Download and install the Jenkins repository public key
wget -q -O - [https://pkg.jenkins.io/debian-stable/jenkins.io.key](https://pkg.jenkins.io/debian-stable/jenkins.io.key) | sudo apt-key add -
This public key certifies the origin of the packages to be installed and prevents manufacturer impersonation attempts. It is a very common and normal procedure.
2. Add the Jenkins repository to your list of repositories
nano /etc/apt/sources.list
The previous command will open our repository list with a text editor. Then, add the following line to the end of the document.
deb https://pkg.jenkins.io/debian-stable binary/
Save the changes with CTRL+O and exit the editor with CTRL+X.
3. Update the package list
apt-get update
The previous command will update the package list, including those from the Jenkins repository that we have added.
4. Install Jenkins with the package manager
apt-get install jenkins
Finally, with the previous command, you can complete the installation of Jenkins. That's how easy it is.
success That's it! If you have followed the previous steps correctly, you will now have Jenkins installed and you can connect to it using a web browser via port 8080. For example:
http://<ip-address>:8080