A brief introduction to the use of jenkins in Linux systems

  

jenkins is an open software platform, and there are many software platforms in Linux systems, but Jenkins has always been the most popular one. This article will briefly introduce the installation and use of jenkins in Linux systems.

Installing jenkins

First of all, we have installed jdk in the system, preferably jdk1.5 or above.

http://jenkins-ci.org/Download the native environment corresponding installation package

windows Run java –jar Jenkins.war.

mac Direct installation to download the jenkins file.

Enter http://localhost:8080 in your browser.

jenkins is stored by default in the .jenkins folder in the user's home directory.

mac is saved in /Users/Shared/Jenkins

locally installed on the virtual machine CentOS.

Note that JAVA can be run to run .sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo

sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

sudo yum install jenkins

Install GITyum update

Yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel

yum install curl-devel

yum install autoconf

wget http://git -core.googlecode.com/files/git-1.8.3.2.tar.gz

tar xzvf git-1.8.3.2.tar.gz

cd git-1.8.3.2

autoconf

. /configure --with-curl=/opt/git

make

make install

Modify the etc/passwd file so that the jenkins user has ssh operation privileges. Jenkins:x:496:496:Jenkins Continuous Integration Server:/var/lib/jenkins:/bin/bash

Using jenkins user su jenkins

and then generating ssh-keyssh -keygen -t Rsa -C “[email protected]

Enter http://192.168.0.101:8080

in the browser. jenkins use

System Management--Management Plugin - optional plugin search git

Install Git plugin and GitHub plugin plugin

Go to “System Management ->System Settings” Set Jenkins related parameters. Mainly set the parameters of Git and GitHub plugin, add the path of the machine's git in the Path to executable column under Git, add the local Git user.name and user.email information under Git plugin, in GitHub Web Hook Add information about your GitHub account.

If you want to use the mail function, you need to add the SMTP server and mailbox information in the email notification column. After adding, click the Test button to test whether you can send the mail normally. This function can be followed. The Email Notification function is enabled in the project.

Set GIT

new projects

configure ssh key Previous 12 Next Total 2

Copyright © Windows knowledge All Rights Reserved