# How to Safely Install Jenkins on Linux(Ubuntu) Without Errors

It's already Friday 🥳, and I'm glad you're here.

Time to share knowledge. Of course, it's another day of problem-solving.

As a result, DevOps engineers interested in using the latest Ubuntu features in their CI should undertake an Ubuntu 20.04 Jenkins installation, which is the subject of this post.

We will install Jenkins on our Ubuntu server in a few steps in this article. I discovered some information about this, but it failed when I tried to install it, and I will tell you how I could fix it because you may run into the same problem.

## Installation

- Download package information from all configured sources.

```
sudo apt-get update
```

- Install openjdk-8-jdk

Here is an important step that I don't know about, which made me ran into an error.

Several developers, including myself, have encountered the dreaded `Failed to start LSB: Start Jenkins at boot time` problem when installing Jenkins on Ubuntu with Java 11.

However, we will use `openjdk-8-jdk` to ensure we don't run into the same error again.

Use the command below to install `openjdk-8-jdk`

```
sudo apt-get install openjdk-8-jdk
```

- We will type the following commands as shown below

```
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
```

then

```
sudo sh -c 'echo deb https://pkg.jenkins.io/debian binary/ > \
    /etc/apt/sources.list.d/jenkins.list'
```

- Let us update package information

```
sudo apt-get update
```

- Install Jenkins

```
sudo apt-get install jenkins
```

Voila 🥳 we are good to go.

On the terminal, we will see a prompt on configuring administrator on Jenkins and getting started.


That's it, for this Friday, I hope you find this information useful.


I'd love to connect with you at [Twitter](https://twitter.com/olanetsoft) | [LinkedIn](https://www.linkedin.com/in/olubisi-idris-ayinde-05727b17a/) | [GitHub](https://github.com/Olanetsoft) | [Portfolio](https://idrisolubisi.com/)

See you next Friday in [DevOpsFriday](https://blog.idrisolubisi.com/series/devops) series. Take care!!!
