How To Install Jenkins on Ubuntu
Prerequisites
- Hardware Requirements:
- RAM- 4 GB (Recommended)
- Storage- more than 50 GB of Hard Disk Space (Recommended)
- Software Requirements:
- Java: Java Development Kit (JDK) or Java Runtime Environment (JRE).
- Web Browser: Any browser such as Google Chrome, Mozilla Firefox, Microsoft Edge.
Why Use Jenkins?
You need to consider continuous integration (CI) and continuous delivery (CD) to understand Jenkins:
- Continuous integration – the practice of continuous production combined with the main industry.
- Continuous delivery – the code is constantly delivered to an area after the code is ready for delivery. It could be for production or staging. The commodity is supplied to a consumer base that can provide QA or inspection by customers.
Installation Procedure:
Step 1: Install Java
$ java --version
$ sudo apt update
$ sudo apt install openjdk-8-jdk
Step 2: Install Jenkins
1. add the framework repository key:
$ wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add
2. Next, link the repository of Debian packages to the sources.list of the server:
$ sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
3. When both are in place, upgrade to apt to use the new repository:
$ sudo apt update
4. Install Jenkins:
$ sudo apt install jenkins
Step 3: Start Jenkins
1. You can start Jenkins using systemctl:
$ sudo systemctl start jenkins
$ sudo systemctl status jenkins
Output:
jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: active (exited) since Sat 2021-04-17 00:34:17 IST; 26s ago
Docs: man:systemd-sysv-generator(8)
Process: 17609 ExecStart=/etc/init.d/jenkins start (code=exited, status=0/SUCC
Step 4: Opening the Firewall
$ sudo ufw allow 8080
$ sudo ufw status
Successfully Installed Jenkins
Comments