Jenkins, formerly known as Hudson.
Jenkins is an open source CI & CD software, used to automate a variety of tasks, including build, test and deploy software.
Jenkins support various operation modes, the Java program can be a separate package through the system, or by Docker.
The official document: https://jenkins.io/zh/doc/
Installation roughly divided into two types, war yum mode and packet mode (or essentially war package).
Jenkins needs JDK environment
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
# Extracting the tar -zxf / opt / JDK-x64-Linux--8u221. The tar .gz -C / opt / # Configure JDK environment variable VI / etc / Profile # the JAVA_HOME # Tag Export Export to the global variable Export the JAVA_HOME = / opt . / jdk1 . 8 .0_221 / . # represents the current path: delimiter indicates Export the CLASSPATH =:. $ the JAVA_HOME / lib / Dt.jar: $ the JAVA_HOME / lib / the tools.jar: the CLASSPATH $ # $ denotes the pATH current extraction system values, similar to I = . 3 + I Export the PATH = $ the JAVA_HOME / bin: $ the JAVA_HOME / JRE / bin: the PATH $ # refresh environment variable Source / etc / Profile
A, war mounted
You need to install Tomcat: https://tomcat.apache.org/download-80.cgi
Download war package (the Generic Package Penalty for the Java (the .war)): https://jenkins.io/zh/download/
Then jenkins.war into the webapp directory, start tomcat can access (Note firewall).
Default data storage path: ~ / .jenkins
Two, yum installed
https://pkg.jenkins.io/redhat/
https://pkg.jenkins.io/redhat-stable/
Long-term support version and update weekly yum different sources
yum install -y wget # wget -O / etc / yum .repos.d / jenkins.repo HTTP: // pkg.jenkins-ci.org/redhat/jenkins.repo # install yum source 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 # installation (war package in / usr / lib / jenkins / directory) yum the install - Y Jenkins # start systemctl start Jenkins # boot from the start systemctl enable Jenkins # turn off the firewall systemctl STOP firewalld # Turn off the firewall boot from the start systemctl disable firewalld
Profile Path: / etc / sysconfig / jenkins, default access port: 8080, default data storage path: / var / lib / jenkins
Third, the installation is provided
Yum way to, for example, start the service after installation, browser access to port 8080.
The first access requires an administrator password, follow the prompts to get filled.
Select the plug-in, choose where to install their choice. Initially, the installation of a language plug-ins. After the function desired, add plug-ins.
Create a user, admin can choose here, behind the need to add.
Examples of configuration, default.
Set a new password
Restart jenkins, plus you can restart after the url
Update Source
Jenkins View Mirror Address: http://mirrors.jenkins.io/status.html
# Default https://updates.jenkins.io/update-center.json # Huawei https://mirrors.huaweicloud.com/jenkins/updates/update-center.json # Tsinghua University https: //mirrors.tuna.tsinghua .edu.cn / jenkins / updates / update- center.json
https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions