## Install java
sudo apt update && sudo apt install openjdk-8-jdk -y
## Install Jenkins
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ >
/etc/apt/sources.list.d/jenkins.list'
sudo apt-get update && sudo apt-get install jenkins -y
#Starting Jenkins
sudo systemctl start jenkins
#Configure Jenkins to start at boot
sudo systemctl enable jenkins
#Checking status of jenkins
sudo systemctl status jenkins
#Will show below output if everything is working fine:
#Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
#Active: active (running) since Tue 2018-11-13 16:19:01 +03; 4min 57s ago
sudo wget -O /etc/yum.repos.d/jenkins.repo
https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum upgrade
# Add required dependencies for the jenkins package
sudo yum install java-11-openjdk
sudo yum install jenkins
sudo systemctl daemon-reload
jenkins installation
root@ubuntu-14:~# apt-get install nginx