CentOS6 Installing Jenkins

Source: Internet
Author: User

1. Install the latest version of the JDK (as a Jenkins operating environment)
# mount-t CIFS//192.168.8.1/share/mnt-o USERNAME=SHARE,PASSWORD=SHARE,NOUNIX,SEC=NTLMSSP

Where NOUNIX,SEC=NTLMSSP two parameters is because I have a shared folder of OS X

# 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
#此处的选择会影响后面Jenkins的Git配置, the former does not need to be configured, with the latter Jenkins cannot identify git, you need to complete the 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 Modifying 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 are 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 need to configure branch filtering to activate the build with Webhooks, events from any branch can activate the widget

CentOS6 Installing Jenkins

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.