Jenkins is a widely-used open-source automation server that helps to automate the building, testing and deployment of software projects. In this tutorial, we will walk you through the process of installing Jenkins on Debian latest.
Before getting started, you need to have the following prerequisites:
Jenkins requires Java to be installed on the system. In order to install Java 11 or higher, run the following commands:
sudo apt update
sudo apt install -y openjdk-11-jdk
Verify the Java version using the following command:
java -version
This should output the Java version installed on your system.
Next, we need to add Jenkins Repository to Debian. We can add the package repository by adding its GPG key to the system, and then adding the package repository to a new file named /etc/apt/sources.list.d/jenkins.list. Run the following commands:
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
Once Jenkins repository is added to Debian, run the following commands to install Jenkins on Debian server:
sudo apt update
sudo apt install jenkins
This will install Jenkins along with its dependencies.
After installing Jenkins, run the following commands to start and enable the Jenkins service:
sudo systemctl start jenkins
sudo systemctl enable jenkins
Jenkins service should now be running on your system.
Finally, to access Jenkins, open up a web browser and navigate to http://your_server_ip_or_domain_name:8080. You should be prompted with a landing page to set up Jenkins:
To obtain the initial admin password, SSH into your server, and run the following command:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
You should be provided with the initial admin password for Jenkins. Enter this password on the Jenkins setup page to get started with Jenkins.
In this tutorial, we showed you how to install Jenkins on Debian latest, along with the steps required to configure the Jenkins service and access the web interface. You can now use Jenkins to automate your software projects and streamline deployments.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!