Jenkins is a self-contained, open source automation server which can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software. Jenkins can be installed through native system packages, Docker, or even run standalone by any machine with a Java Runtime Environment (JRE) installed.
In this case we'll install it on Linux environment (Debian), to do so we need to know about miimum system requirements to run jenkins. For linux, at least we need :
For recommendation we can prepare :
1. First of all we must setup Java as we mention earlier that jenkins run with JRE installed. To install java in Debian :
apt update
apt install openjdk-11-jre
2. Then, we install Jenkins by adding key and repo :
curl -fsSL https://pkg.jenkins.io/debian/jenkins.io.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
apt update
apt install jenkins -y
3. Continue with browser installation step :
For the first time we launch jenkins to continue installation process, we'll need to unlock jenkins with temporary password generated by jenkins.
To view the password :
cat /var/lib/jenkins/secret/initialAdminPassowrd
Or, we can see the password by view the jenkins service status, to do so :
systemctl status jenkins
Choose default plugins to be installed at this step, and wait until plugin installation finish.
After plugin installation finish, we'll be required to set first admin password to log in and manage jenkins, this account will replace the previous one (at first we use for installation). We can adjust this step with our preference (please set strong password if the jenkins are publicy accessible via internet), then to finish, click on Save and Continue.
This will bring us to jenkins dashboard.
Jenkins dashboard will looks like this at first.
At this step we have done with jenkins installation, for the next, we'll add some plugins, creating jobs to deploy our first app, expose jenkins API, and learn about automating deployment.