Jenkins : How to download and install Jenkins

Sunday, January 26, 2020

Jenkins : How to download and install Jenkins



Jenkins is an open source automation server. which help to automate the non human part of software development process with continuous integration, continuous delivery and continuous deployment. It a server based system, which runs servlet container such as apache tomcat. 

Jenkins
Jenkins - Installation of Jenkins

1. Overview

            
        Jenkins is an open-source automation tool developed by sun microsystem and written in Java. Initial released date was 2nd february 2011. Jenkins offers continuous integration with continuous delivery and continuous deployment pipeline. Jenkins setup is also breeze due to java based construction. It is ready to play right out of the box & works well with windows, Mac OS X, Linux and Ubuntu.


In this tutorial we will walk you through steps of installing Jenkins on a Linux operating system. 

2. Hardware Requirements

  • We need minimum 256 mb of RAM in order to install Jenkins on computer.
  • 1 GB hard drive space

3. Software Requirements

              Since Jenkins developed by sun microsystem and written in Java. We have to make sure about that Java is Installed in our system. In order to see whether Java is installed or not, we can say from terminal or command prompt - 

java -version

openjdk version "12.0.1" 2019-04-16
OpenJDK Runtime Environment (build 12.0.1+12)
OpenJDK 64-Bit Server VM



If it is not yet installed then - 


# install java 1.8 on Amazon Linux
sudo yum update -y
sudo yum install -y java-1.8.0-openjdk-devel
sudo alternatives --config java



4. Install Jenkins on Linux Operating System

        For installation of Jenkins on linux operating system please follow up the below steps - 


# install Jenkins on Amazon Linux

sudo wget -O /etc/yum.repos.d/jenkins.repo

http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo sudo rpm --import
http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
sudo yum install jenkins


If you are installing Jenkins in Amazon Cloud server, while connecting to EC2 server make sure you have followed the below steps, or else you won't be able to connect -

# ssh into EC2 instance
ls -lah /path/jenkins-key.pem
chmod 400 /path/jenkins-key.pem
ssh -i /path/jenkins-key.pem
ec2-user@ec2-123-456-78-9.compute-1.amazonaws.com

Once your installation is done please start and enable your Jenkins service by saying - 

# start Jenkins at boot time
sudo systemctl start jenkins.service
sudo systemctl enable jenkins.service

If you want to restart your Jenkins please follow below steps - 

#Restart Jenkins
sudo /etc/init.d/jenkins restart

Make sure you have installed git if you are dealing with cloning repository from bitbucket or Github or any other platform - 

# install git
sudo yum install git


5. Install Jenkins on RPM Distros Operating System

      For installation of Jenkins on rpm distros please follow up the below steps - 

# Add yum repo and install Jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo
http://pkg.jenkins-ci.org/redhat-stable/
jenkins.repo
sudo rpm --import
http://pkg.jenkins-ci.org/
redhat-stable/jenkins-ci.org.key
sudo yum install jenkins

Once your installation is done please start and enable your Jenkins service by saying - 

# Start Jenkins at boot time
sudo systemctl start jenkins.service
sudo systemctl enable jenkins.service

If you want to restart your Jenkins please follow below steps - 

#Restart Jenkins
sudo /etc/init.d/jenkins restart

6. Install Jenkins on Ubuntu Operating System

        For installation of Jenkins on ubuntu please followup the below steps - 


# Add PPA repo for Jenkins stable LTS
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key
| sudo apt-key add -
sudo sh -c "echo deb http://pkg.jenkins.io/debian-stable binary/ >
/etc/apt/sources.list.d
/jenkins.list"
sudo apt-get update

# Install Jenkins
sudo apt-get install jenkins

Once your installation is done please start and enable your Jenkins service by saying - 

# Start Jenkins at boot time
sudo systemctl start jenkins.service
sudo systemctl enable jenkins.service

If you want to restart your Jenkins please follow below steps - 

#Restart Jenkins
sudo /etc/init.d/jenkins restart

7. Install Jenkins with Docker

          For installation of Jenkins with docker please follow the below steps - 

# Pull official Docker image for Jenkins LTS
docker pull jenkins/jenkins:lts

# Start Docker container
docker run -p 8080:8080 -p
50000:50000 -v
jenkins_home:/var/jenkins jenkins/jenkins:lts

# Start Docker container in detached mode
docker run -p 8080:8080 -p 50000:50000 -v
jenkins_home:/var/jenkins -d
jenkins/jenkins:lts


8. Unlock Jenkins 


Once your installation is done you can type from your browser - 

If you have installed Jenkins in your local system then - 

localhost:8080

If you have installed Jenkins in your server then - 

Your_Server_Public_Ip:8080

You will get the below screen - 

Unlock Jenkins
Unlock Jenkins
Order to get the password from you command prompt do - 

cat the_path_is_provided_on_screen_like
cat
/var/lib/jenkins/secretes/initialAdminPassword


Please copy the password from the terminal and click on continue, you will see - 

Customize Jenkins
Customize Jenkins

Click on Install Suggested Plugins, then - 

jenkins getting started
Jenkins Getting Started

Once your installation is done, you will be asking for reset password - 

Reset your username and Password
Reset your username and password
Click on save and continue, 

Jenkins Instance Configuration
Jenkins Instance Configuration
Click on save and continue and congratulations, we have successfully installed Jenkins Server. Hit start using Jenkins - 

Jenkins is ready
Jenkins is ready

Then you will see the below screen - 

Welcome to Jenkins - Start Create New Job
Welcome to Jenkins - Start Create New Job


More details please visit official Documentation - https://jenkins.io
More details please visit my youtube video - 









12 comments :

DevOps said...

This is good information and really helpful for the people who need information about this.
Docker and Kubernetes Training
Docker and Kubernetes Online Training

Ishita Jack said...

Great collection and thanks for sharing this info with us. Waiting for more like this.
Full Stack Developer course in Chennai
Full Stack Training in Chennai
Full Stack Development Online Course

Hemapriya said...

Really wonderful blog! Thanks for taking your valuable time to share this with us. Keep us updated with more such blogs.
AWS Certification in Chennai
AWS Online Training
AWS Training in Coimbatore

Ishita Jack said...

Excellent article and with lots of information. I really learned a lot here. Do share more like this.
Salesforce course in Chennai
Salesforce Online Course
Salesforce course in Bangalore

Ishita Jack said...
This comment has been removed by the author.
malathy mine said...

Great post. It's very useful information. Do share more like this.
.Blue Prism course in Chennai
.Blue Prism Training Institute in Chennai

SBP Windows said...

Excellent article this article gives more useful information to us... Our service is also helpful to you…
Best UPVC Windows and Doors Manufacturer in Chennai
Latest Upvc Doors in Chennai

Best UPVC Windows in Chennai
Best Aluminium Windows in Chennai

Christy said...

Thanks for giving a very interesting blog. Very nice to see your blog.
IOS app development company in chennai
Mobile app development company in chennai
SMO Services in chennai

Shiva Shakthi said...

Great info. The content you wrote is very interesting to read. This will be loved by all age groups.
role of digital marketer
digital marketing roles

EZaccounting said...

This article is extremely informative, keep updating more blogs.
Myob accounting
Myob accounting Singapore
Singapore accounting software

Vidhyamenon said...

Great Blog with Good Information.

Blue Prism Online Training
Blue Prism Training in Chennai

Christy said...

I am very inspired to read your wonderful blog, it is good to see your valuable blog.
SMO Services in chennai
best mobile app development company in chennai
SEO Company in Chennai