CentOS6 install Jenkins

Source: Internet
Author: User

CentOS6 install Jenkins

How to install Jenkins in CentOS6.

1. Install the latest JDK version (as the JENKINS runtime environment)
# Mount-t cifs // 192.168.8.1/share/mnt-o username = share, password = share, nounix, sec = ntlmssp

Among them, nounix and sec = ntlmssp are two parameters because I am connected to an OS X shared folder.

# Cd/mnt/
# Rpm-ivh jdk-8u74-linux-x64.rpm

2. Install the latest version of GIT.
# Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker-y
# Wget https://www.kernel.org/pub/software/scm/git/git-2.7.1.tar.gz
# Tar-xzvf git-2.7.1.tar.gz
# Cd git-2.7.1
# Make prefix =/usr/local/git all
# Make prefix =/usr/local/git install

# Ln-s/usr/local/git/bin/git/usr/bin/git
OR
# Echo "export PATH = $ PATH:/usr/local/git/bin">/etc/bashrc
# Source/etc/bashrc
# The selected option will affect Jenkins's Git configuration. If you use the former, you do not need to configure it. If you use the latter, Jenkins cannot identify git. You must enter an absolute path in Jenkins system management.

3. Install JENKINS
# Wget-O/etc/yum. repos. d/jenkins. repo http://pkg.jenkins-ci.org/RedHat-stable/jenkins.repo
# Rpm -- import https://jenkins-ci.org/redhat/jenkins-ci.org.key
# Yum install jenkins
3.1 modify the JENKINS root directory
# Vim/etc/sysconfig/jenkins
JENKINS_HOME = "/jenkins"
# Vim/etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
* Filter
: Input accept [0: 0]
: Forward accept [0: 0]
: Output accept [0: 0]
-A input-m state -- state ESTABLISHED, RELATED-j ACCEPT
-A input-p icmp-j ACCEPT
-A input-I lo-j ACCEPT
-A input-m state -- state NEW-m tcp-p tcp -- dport 8080-j ACCEPT
-A input-m state -- state NEW-m tcp-p tcp -- dport 22-j ACCEPT
-A input-j REJECT -- reject-with icmp-host-prohibited
-A forward-j REJECT -- reject-with icmp-host-prohibited
COMMIT
# Service iptables restart
# Mkdir/jenkins
# Chown jenkins: jenkins/jenkins
# Service jenkins start

4. Integration with GitLab
Plugin required: Git Plugin GitLab Plugin
Note: If you use webhooks to activate the building, you need to configure branch filtering. Otherwise, any branch event can activate the component.

Automatically generate and publish GitBook (Nginx) using GitLab + Jenkins in the LAN)

Linux + Git + Maven + Jenkins + Neuxs automated compilation environment setup

Use Jenkins to configure Git + Maven for automated building

Configure Jenkins + Maven + Git for continuous integration and automatic deployment

Distributed building and deployment of Jenkins-nodes

Jenkins details: click here
Jenkins: click here

This article permanently updates the link address:

Related Article

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.