jenkins installation and domestic mirrored configuration

1. Download jenkins.war

wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/war/latest/jenkins.war

Installation jdk8 +, etc.

2. Start jenkins

jenkins.sh

#! / bin / bash 
# Configure To start off script name 
process_name = "jenkins.war" 
http_port = 9191 
# Modify the port and JENKINS_HOME current is the current directory Export JENKINS_HOME =. / Home # Add the startup command function Start () { echo " ... Start " the nohup Java -jar $ $ Http_port process_name --httpPort = 2> &. 1 & echo" Start successful " return 0 } # Add stop command function sTOP () { echo" sTOP ... " PS AUX | grep $ process_name | grep -v grep | awk '{Print "the kill -9" $ 2}' | SH echo "STOP successful" return 0 } Case $. 1 in "Start") Start ;; "stop") stop ;; "restart") && Start STOP ;; *) echo "Enter: Start, STOP, restart" ;; esac

  

chomod +x  *.sh  

./jenkins.sh start

 

3. Modify the Configuration

$JENKINS_HOME/hudson.model.UpdateCenter.xml

<?xml version='1.1' encoding='UTF-8'?>
<sites>
<site>
<id>default</id>
<url>https://updates.jenkins-zh.cn/update-center.json</url>
</site>  

Download the certificate to $ JENKINS_HOME / war / WEB-INF / update-center-rootCAs /

wget  https://raw.githubusercontent.com/jenkins-zh/mirror-adapter/master/rootCA/mirror-adapter.crt 

Remove the plug Cache $ JENKINS_HOME / updates

Why mirror and download a certificate, to https://community.jenkins-zh.cn  learning

4. Restart jenkins, re-enter the initial page

Browser ip: 9191 / restart

Guess you like

Origin www.cnblogs.com/startnow/p/12044099.html