Jenkins Installation Steps

You might also like

Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 7

https://tecadmin.

net/install-jenkins-in-ubuntu/
https://www.howtoforge.com/tutorial/how-to-install-jenkins-with-apache-on-ubuntu-16-04/
http://www.beopensource.com/2016/09/how-to-install-jenkins-in-ubuntu-1604.html
https://hiromia.blogspot.in/2016/03/the-installation-procedure-of-jenkins.html
https://hiromia.blogspot.in/2013/03/deployment-procedure-of-apache-tomcat.html
http://www.tk4479.net/jgw2008/article/details/76592488
https://kogentadono.com/2017/03/08/ci-with-jenkins-on-ubuntu-16-04-part-1-installation-and-
configuration/

http://www.cyberphoton.com/jenkins-on-ubuntu/

http://www.cyberphoton.com/install-nginx-on-ubuntu16/

https://linoxide.com/linux-how-to/install-git-ubuntu-16-04/ >>>> Git Installation

https://www.howtoforge.com/tutorial/building-and-publishing-custom-docker-images/

Jenkins is an automation server and continuous integration tool. It provides a number of plugins for
building deployments and automation for your applications. You can use Jenkins as a simple CI
(Continuous Integration) server or configure this for the CD (Continuous Delivery) hub for any
number of the projects. With the help of Jenkins, you can easily distribute work across multiple
machines, helping drive builds, tests and deployments across multiple platforms faster.

s an automation server and continuous integration tool. It provides a number of plugins for building
deployments and automation for your applications. You can use Jenkins as a simple CI (Continuous
Integration) server or configure this for the CD (Continuous Delivery) hub for any number of the
projects. With the help of Jenkins, you can easily distribute work across multiple machines, helping
drive builds, tests and deployments across multiple platforms faster.
This tutorial will help you to install and use Jenkins on Ubuntu 16.04 LTS & 14.04 LTS systems.

Step 1 – Add Jenkins PPA


Jenkins is available in two versions. One is LTS release provides long-term support and other
provides the latest version. We preferred to use LTS version for production use and the latest
version for development or testing. You can use any of version of your choice below.
Add LTS Version PPA
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'

Add Latest Version PPA


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'
Step 2 – Install Jenkins
Now update your apt-get cache and install Jenkins using the following commands.
sudo apt-get update
sudo apt-get install jenkins

After installation Jenkins start on port 8080. In my case port, 8080 was busy in some other process
so edited /etc/default/jenkins and update HTTP_PORT to 8081.
HTTP_PORT=8081

and restarted Jenkins service again


sudo service jenkins restart

Step 3 – Access Web Interface


Now access your server on port 8080 (in my case 8081) in your favorite web browser. Default
installation password can be found at /var/lib/jenkins/secrets/initialAdminPassword as showing
in below image.

Now select appropriate option to install the plugin. You can choose to install suggested plugins or
select required plugins options.
Now create an admin account for your Jenkins setup. This will be required to log in to Jenkins.

After successful completion of Jenkins setup wizard, You will be redirected to Jenkins dashboard.
Step 4 – Install Plugins in Jenkins
Login to Jenkins dashboard and navigate to Manage Jenkins >> Manage Plugins >> Available
Tab and select the plugins to install.

To update existing installed plugins in Jenkins Manage Jenkins >> Manage Plugins >> Update
Tab
Step 5 – Create Users in Jenkins
To create users in Jenkins login to Jenkins admin panel and navigate to Manage Jenkins >>
Manage Users >> Create User . Enter the required details and click Create User.

systemctl start jenkins


systemctl status jenkins

Below Link is to openjdk1.8 Installation

http://www.beopensource.com/2016/09/how-to-install-java-8-in-
ubuntu-1604.html

https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/install-java-
jdk-8-on-ubuntu-14-10-linux-mint-17-1.html

https://tecadmin.net/install-openjdk-java-ubuntu/
Step 1 – Search OpenJDK Available Packages
$ apt-cache search openjdk

Sources available under


/etc/apt/sources.list.d/

Remove the OpenJDK from the system, if you have it already


installed.
$ sudo apt-get remove --purge openjdk*

$ sudo apt-add-repository ppa:webupd8team/java


$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
$ java -version

Java is installed in this location


/usr/lib/jvm/java-8-oracle/

Set JAVA_HOME
$ sudo echo "JAVA_HOME=/usr/lib/jvm/java-9-openjdk-amd64/" >> /etc/environment
$ source /etc/environment
$ echo $JAVA_HOME

Another way of java installation in ubuntu

$ java -version
$ apt install openjdk-1.8-JDK
it is installed at ->>>>>>>>>>>> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

The easiest way to Install Jenkins in any OS is by downloading Jenkins war file from here and
running the command java -jar jenkins.war to run it. But in this article for Installing Jenkins in
Ubuntu 16.04, we will see the graphical way to install and configure it. I am installing Jenkins
2.7.4.

$ wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.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


$ sudo apt-get install jenkins
$ /etc/init.d/jenkins
Jenkins installation via war
1) pre-requisites
must have java installed
2) download jenkins jar
http://mirrors.jenkins.io/war-stable/latest/jenkins.war
3) copy jenkis to some folder where you want to run jenkins
through commandline
eg: in my case i created a folder at desktop
go to jenkins folder and run

$ java -jar jenkins.war

admin
admin1234

You might also like