"Linux" Jenkins Installation and configuration

Source: Internet
Author: User
Tags server port

1. First prepare the Java environment and install the JDK.

: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Not much to introduce here

2. Download Jenkins to Linux server

View Kernel version information:cat/proc/version; more/etc/issue

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/8E/51/wKioL1i9NK-jsopCAAA-Xpq9Evw724.png-wh_500x0-wm_ 3-wmp_4-s_570535673.png "title=" To view the system version information. png "alt=" wkiol1i9nk-jsopcaaa-xpq9evw724.png-wh_50 "/>

: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions# Installingjenkinsonredhatdistributions-importantnoteoncentosjava


On-Demand selection: Latest Version or stable version

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/8E/53/wKiom1i9NQeCHsMqAADkuipaxKo026.png-wh_500x0-wm_ 3-wmp_4-s_3818905698.png "title=" 6587097812@chatroom_1488793317541_82.png "alt=" Wkiom1i9nqechsmqaadkuipaxko026.png-wh_50 "/>


Here choose the latest version, Shyongyum way to download the installation

[[Email protected]_18_93 xxxx]# sudo wget-o/etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/8E/51/wKioL1i9NrSBqAZ9AABIL-M7Q6o577.png-wh_500x0-wm_ 3-wmp_4-s_2091256687.png "title=" code 1.png "alt=" Wkiol1i9nrsbqaz9aabil-m7q6o577.png-wh_50 "/>



[Email protected]_18_93 xxxx]# sudo rpm--import https://jenkins-ci.org/redhat/jenkins-ci.org.key

[[Email protected]_18_93 xxxx]# sudo yum install Jenkins

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/8E/53/wKiom1i9NsuhQhvNAAC3IzF8iYs708.png-wh_500x0-wm_ 3-wmp_4-s_1697911926.png "title=" installation complete. png "alt=" wkiom1i9nsuhqhvnaac3izf8iys708.png-wh_50 "/>

When you see the Jenkins version and the complete word, it's already installed


Next Configure the Jenkins port: Vi/etc/sysconfig/jenkins

Modify jenkins_port= "8080", Default to "8080"

To view the port number that the server is currently using: Netstat-ntulp |grep 80

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/8E/51/wKioL1i9OcXQtmm2AAAdSA0cXhE224.png-wh_500x0-wm_ 3-wmp_4-s_1368444429.png "title=" to view the server port number. png "alt=" wkiol1i9ocxqtmm2aaadsa0cxhe224.png-wh_50 "/>

"8080" port is not used, landlord here changed to "8888"


3. Start Jenkins

Enter "Service Jenkins restart", startup failure

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8E/55/wKioL1i-FNuDIqsiAAAWiwDkqCI061.png-wh_500x0-wm_ 3-wmp_4-s_2665648389.png "title=" failed to start. png "alt=" wkiol1i-fnudiqsiaaawiwdkqci061.png-wh_50 "/>

is a JDK configuration issue

enter [[Email protected]_18_93 ~]# vi/etc/init.d/jenkins Modify JDK Configuration

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/8E/55/wKioL1i-FeeiJZ-tAAAfxqAa9oY245.png-wh_500x0-wm_ 3-wmp_4-s_700850219.png "title=" JDK configuration. png "alt=" wkiol1i-feeijz-taaafxqaa9oy245.png-wh_50 "/>

Add a JDK installation path before "/usr/bin/java"


Now it's ready to start:

[[Email protected]_18_93 ~]# Service Jenkins restart

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8E/55/wKioL1i-F1CBP9haAAAQMe876fQ212.png-wh_500x0-wm_ 3-wmp_4-s_3927429764.png "title=" started successfully. png "alt=" wkiol1i-f1cbp9haaaaqme876fq212.png-wh_50 "/>


Enter "http://IP:8888" login in the local browser Jenkins, the first time you sign in Jenkins will ask to unlock

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/8E/55/wKioL1i-GILhJCJwAAEAkOZ9-Wo722.png-wh_500x0-wm_ 3-wmp_4-s_2730086629.png "title=" browser opens the. png "alt=" wkiol1i-gilhjcjwaaeakoz9-wo722.png-wh_50 "/>

Open the path in the red flag, remove the password, fill in, and click "Continue"

[Email protected]_18_93 ~]# cd/var/lib/jenkins/secrets:

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/8E/57/wKiom1i-GWDiKW3dAAAP0r5MISE224.png-wh_500x0-wm_ 3-wmp_4-s_4130967183.png "title=" to remove the password. png "alt=" wkiom1i-gwdikw3daaap0r5mise224.png-wh_50 "/>

When the input is complete, you will be prompted to install the custom plugin or the recommended plugin, where I choose the recommended plugin:

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/8E/57/wKiom1i-GlyxVJZ_AAESXN6Hwfw533.png-wh_500x0-wm_ 3-wmp_4-s_1449917165.png "title=" select Plug-in. png "alt=" wkiom1i-glyxvjz_aaesxn6hwfw533.png-wh_50 "/>

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8E/57/wKiom1i-GsKg6JJtAADWnDDJa4A405.png-wh_500x0-wm_ 3-wmp_4-s_865694401.png "title=" Install plug-in. png "alt=" wkiom1i-gskg6jjtaadwnddja4a405.png-wh_50 "/>


Wait for the plug-in to complete after installation

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/8E/55/wKioL1i-G1yxtCfZAABmxMSgkaM658.png-wh_500x0-wm_ 3-wmp_4-s_728925851.png "Title=" after the installation is complete. png "alt=" wkiol1i-g1yxtcfzaabmxmsgkam658.png-wh_50 "/>

Enter the information above to set up an administrator user

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8E/55/wKioL1i-G96Cab2fAABDaU-Z64c328.png-wh_500x0-wm_ 3-wmp_4-s_3655044293.png "title=" after you set the administrator user. png "alt=" wkiol1i-g96cab2faabdau-z64c328.png-wh_50 "/>


650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/8E/57/wKiom1i-HFSQ7PMLAACEGLMO0FQ737.png-wh_500x0-wm_ 3-wmp_4-s_4022807679.png "title=" Jenkins home. png "alt=" wkiom1i-hfsq7pmlaaceglmo0fq737.png-wh_50 "/>

At this point, Jenkins has completed installation.

Project building will be explained in detail on subsequent blogs

This article is from the "Point notes" blog, so be sure to keep this source http://zoe26.blog.51cto.com/12657060/1903836

"Linux" Jenkins Installation and configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.