# Install Jenkins on Ubuntu 🚀

![](https://miro.medium.com/v2/resize:fit:1400/1*QKr7ufj6hzj7oH1Y8ZUv4g.png align="left")

Jenkins is an open-source automation server that is used primarily for continuous integration (CI) and continuous delivery (CD) pipelines. It helps automate the building, testing, and deployment of software applications

# **Prerequisites**

Minimum hardware requirements:

* 256 MB of RAM
    
* 1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a Docker container)
    

Recommended hardware configuration for a small team:

* 4 GB+ of RAM
    
* 50 GB+ of drive space
    

# **Step 1 :- Installation of Java**

Jenkins requires Java to run, yet not all Linux distributions include Java by default. Update the Debian apt repositories, install OpenJDK 17, and check the installation with the commands:

```plaintext
sudo apt update
sudo apt install fontconfig openjdk-17-jre
java -version
openjdk version "17.0.8" 2023-07-18
OpenJDK Runtime Environment (build 17.0.8+7-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.8+7-Debian-1deb12u1, mixed mode, sharing)
```

# **Step 2:-Installation of Jenkins**

```plaintext
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
```

# **Start Jenkins**

You can enable the Jenkins service to start at boot with the command:

```plaintext
sudo systemctl enable jenkins
```

You can start the Jenkins service with the command:

```plaintext
sudo systemctl start jenkins
```

You can check the status of the Jenkins service using the command:

```plaintext
sudo systemctl status jenkins
```

If everything has been set up correctly, you should see an output like this:

![](https://miro.medium.com/v2/resize:fit:1400/1*TU3e2n-0LdsWHGUZ0e7h7Q.png align="left")

jenkins is running on Port :8080

Ex [http://192.168.62.129:8080](http://192.168.62.129:8080/)

![](https://miro.medium.com/v2/resize:fit:1400/1*KXb8FcIVrglKEgB_9Atqxg.png align="left")

Regarding the Administrator Password Enter the following command on the Ubuntu terminal:

```plaintext
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
```

Enter that password in to jenkins portal and continue

![](https://miro.medium.com/v2/resize:fit:1400/1*qIuPMuqhNZyOvwtZoGW47A.png align="left")

Select Install suggested plugins

![](https://miro.medium.com/v2/resize:fit:1400/1*O7hjcGC7yFGZo0D9MBEAng.png align="left")

![](https://miro.medium.com/v2/resize:fit:1400/1*3vq09mXkY-_G_gIwTKPUOA.png align="left")

Enter the admin user name and password to help you log in the next time. Then, click “Save” and “Continue.”

![](https://miro.medium.com/v2/resize:fit:1400/1*238JLU5pNMLsyG3Ey6a10A.png align="left")

![](https://miro.medium.com/v2/resize:fit:1400/1*yfmkxO9IKJsc_nuR56F3Fg.png align="left")

Jenkins is available for use. Click “Jenkins Start.”
