Jenkins可以提供持续集成服务,它的运行环境(runtime)需要Tomcat和JDK
要把Jenkins让Tomcat启动服务,而Tomcat需要JDK的环境
详情配置参见:
http://www.cnblogs.com/frankielf0921/p/5398334.html
在这之前,要记得关掉防火墙 免得在web页面上无法访问!!!
******我是分割线******
Jenkins配置 官网地址: https://jenkins.io/download/ 选择需要的版本进行下载 [[email protected] ~]# cd /usr/local/src [[email protected] src]# rz /* 如果下载的是rpm */ [[email protected] src]# rpm -ivh jenkins-2.7.4-1.1.noarch.rpm #查询下载的包相关文件存放的路径 [[email protected] src]# rpm -ql jenkins-2.7.4-1.1.noarch.rpm #把Java放入Jenkins的配置文件 [[email protected] ~]# vi /etc/init.d/jenkins //找到 /etc/alternatives/java /usr/lib/jvm/java-1.6.0/bin/java /usr/lib/jvm/jre-1.6.0/bin/java /usr/lib/jvm/java-1.7.0/bin/java /usr/lib/jvm/jre-1.7.0/bin/java /usr/lib/jvm/java-1.8.0/bin/java /usr/lib/jvm/jre-1.8.0/bin/java /usr/bin/java /usr/local/jdk1.8/bin/java <-- 加入自己配置的Java路径 #启动Jenkins [[email protected] ~]# /etc/init.d/jenkins start #进入tomcat的webapps路径看看Jenkins是否已经有Jenkins [[email protected] ~]# cd /usr/local/tomcat/webapps/ #没有的话,就链接 [[email protected] ~]# ln -s /usr/lib/jenkins/jenkins.war jenkins.war #然后用Tomcat去启动Jenkins,它就会自动生成文件 [[email protected] ~]# curl -I localhost:8080/jenkins
******我是分割线******
时间: 2024-10-28 03:39:27