Jenkins is one of the most used automation and continuous integration tool.
Installation
- Jenkins requires Java runtime environment for running.
sudo apt -y update
sudo apt -y install default-jre
- Enable Jenkins PPA
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
- Install Jenkins on debian 10
sudo apt -y update
sudo apt -y install jenkins
Check that service is running after command execution is finished:
catalin@devops:/root$ sudo systemctl status jenkins
● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: active (exited) since Sun 2020-04-26 18:43:07 UTC; 1min 42s ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0 (limit: 9510)
Memory: 0B
CGroup: /system.slice/jenkins.service
Apr 26 18:43:06 devops systemd[1]: Starting LSB: Start Jenkins at boot time...
Apr 26 18:43:06 devops jenkins[69211]: Correct java version found
Apr 26 18:43:06 devops su[69246]: (to jenkins) root on none
Apr 26 18:43:06 devops su[69246]: pam_unix(su-l:session): session opened for user jenkins by (uid=0)
Apr 26 18:43:06 devops su[69246]: pam_unix(su-l:session): session closed for user jenkins
Apr 26 18:43:07 devops jenkins[69211]: Starting Jenkins Automation Server: jenkins.
Apr 26 18:43:07 devops systemd[1]: Started LSB: Start Jenkins at boot time.
By default Jenkins is running on port 8080.
Next, open your browser and type IP of the host plus port 8080 to continue the installation.
Past the password required and proceed to install the recommended plugins.
After installation is finished you can continue as admin or create a new user. Also, you will be required to set up the Jenkins URL, which can also be added later. When these steps are ready you should see Jenkins first page.
At this point, the Jenkins server is running and you can start using it. Check our posts on how to add an agent, create pipelines, configure, and install other plugins and best practices to implement.
Have fun exploring this tool.