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