1、配置JAVA環境變量
2、下載下傳jenkins.jar包,https://jenkins.io/index.html
![](https://img.laitimes.com/img/_0nNw4CM6IyYiwiM6ICdiwiIn5GcuUTNxgzRXlTdBNFSFFUQ0E2SQd3Xtd0apFDTvl2S39CXFlzLcREOvwVMw00LcJDMzZWe39CXt92Yu8GdjFTNuMzcvw1LcpDc0RHaiojIsJye.png)
3、配置JENKINS_HOME,如果不配置JENKINS_HOME,預設JENKINS_HOME為使用者家目錄
4、啟動jenkins
--httpPort=9000 指定啟動端口,預設為8080 ;啟動完成如下圖所示
5、通路http://ip:9000 登入jenkins
這些插件都需要聯網下載下傳安裝,如果無法聯網,可以找一台聯網機器下載下傳好*.jpi,然後上傳到JENKINS_HOME目錄下的plugins目錄
jenkins插件下載下傳位址https://plugins.jenkins.io/ http://updates.jenkins-ci.org/download/plugins/
安裝完成後,提示是否建立使用者,如果不想建立使用者直接點選Continue as admin
下面摘自jenkins官網
To use this repository, run the following command:
If you've previously imported the key from Jenkins, the "rpm --import" will fail because you already have a key. Please ignore that and move on.
With that set up, the Jenkins package can be installed with:
See Wiki for more information, including how Jenkins is run and where the configuration is stored, etc.
遇到問題:
1、在配置salt api的時候有個問題: 當saltapi配置https認證後,使用curl可以認證通過,但是在jenkins上配置上https後測試連接配接無法認證,提示:
Client error: Auth Error: net.sf.json.JSONException: JSONObject["return"] is not a JSONArray.
{"Error": "javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present