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