设为首页 收藏本站
查看: 1172|回复: 0

[经验分享] Jenkins的安装与配置

[复制链接]

尚未签到

发表于 2018-1-7 12:36:39 | 显示全部楼层 |阅读模式
  资源下载:
  --jenkins的war包
  首先从http://jenkins-ci.org/下载最新的jenkins版本,最新版本为1.594,下载的文件载体为jenkins.war;
  Jenkins为免费开源软件,并且更新速度稳定,每周一次更新。所以网站上会提供有2个版本,一个最新版本,一个老但稳定的版本。可自行选择。
  这里我下载的的版本是2.32.1.war
  --ant
  下载地址:http://ant.apache.org/
  这里我下载的是:apache-ant-1.9.8-bin.tar.gz
  --maven
  下载地址: http://maven.apache.org/
  这里我下载的是:apache-maven-3.3.9-bin.zip
  --jdk
  1.7.80
  --tomcat
  7.0.72
  环境变量设置
  

[tomcat@wls12c ~]$ java -version  
java version "
1.7.0_80"  
Java(TM) SE Runtime Environment (build
1.7.0_80-b15)  
Java HotSpot(TM)
64-Bit Server VM (build 24.80-b11, mixed mode)  

[tomcat@wls12c ~]$ ant -version  
Apache Ant(TM) version
1.9.8 compiled on December 25 2016  

  Jenkins的启动
  方式一:直接用命令启动
  Command Line Parameter
  Description
  --httpPort=$HTTP_PORT
  Runs Jenkins listener on port $HTTP_PORT using standard http protocol. The default is port 8080. To disable (because you're using https), use port -1.
  --httpListenAddress=$HTTP_HOST
  Binds Jenkins to the IP address represented by $HTTP_HOST. The default is 0.0.0.0 — i.e. listening on all available interfaces.
  
For example, to only listen for requests from localhost, you could use:
--httpListenAddress=127.0.0.1
  --httpsPort=$HTTP_PORT
  Uses HTTPS protocol on
port $HTTP_PORT
  --httpsListenAddress=$HTTPS_HOST
  Binds Jenkins to listen
for HTTPS requests on the IP address represented by $HTTPS_HOST.
  --prefix=$PREFIX
  Runs Jenkins to include
the $PREFIX at the end of the URL.
  
For example, to make Jenkins accessible at http://myServer:8080/jenkins, set --prefix=/jenkins
  --ajp13Port=$AJP_PORT
  Runs Jenkins listener on
port $AJP_PORT using standard AJP13 protocol.
The default is port 8009. To disable (because you're using https),
use port -1.
  --ajp13ListenAddress=$AJP_HOST
  Binds Jenkins to the IP
address represented by $AJP_HOST. The default is 0.0.0.0 — i.e. listening on
all available interfaces.
  --argumentsRealm.passwd.$ADMIN_USER
  Sets the password for
user $ADMIN_USER. If Jenkins security is turned on, you must log in as the
$ADMIN_USER in order to configure Jenkins or a Jenkins project. NOTE: You
must also specify that this user has an admin role.
(See next argument below).
  --argumentsRealm.roles.$ADMIN_USER=admin
  Sets that $ADMIN_USER is
an administrative user and can configure Jenkins if Jenkins' security is
turned on. See Securing Jenkins for more information.
  -Xdebug
-Xrunjdwp:transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=n
  Sets debugging on and you
can access debug on $DEBUG_PORT.
  -%m-%d_%H-%M"`.log
  Logging to desired file
  -XX:PermSize=512M
-XX:MaxPermSize=2048M -Xmn128M -Xms1024M -Xmx2048M
  referring to these options for Oracle Java
  以9090端口启动
  

java -jar jenkins.war --httpPort=9090  

  方式二、在Web容器中运行
  Jenkins可以运行在标准的Web服务器中,支持Tomcat、Jboss、WebLogic中,只需要将Jenkins.war放置到相应目录,启动服务就可以进行访问;推荐采用这个方式运行,方便配置和迁移。
  Jenkins的访问
  验证jenkins是否运行正常,通过访问http://192.168.0.80:9090
  这里有一个临时密码需要输入,在/home/tomcat/.jenkins/secrets/initialAdminPassword里面

  输入密码进入:

  这里选择把建议的插件全装上去

  --设置用户名和密码

  保存,进入主界面

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-432550-1-1.html 上篇帖子: Jenkins iOS – Git, xcodebuild, TestFlight 下篇帖子: Jenkins在Windows系统dotnet平台持续集成
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表