jenkins安装步骤

其实jenkins官网就有教程,大多时候我比较排斥官网的英文描述,长时间下来发现自己走了不少弯路,官网的操作手册或者理念都是最正宗的:https://jenkins.io/download/

这里我以官网描述总结:

1. To use this repository, run the following command:

Operation:

   sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

   sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

 2.  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.

You will need to explicitly install a Java runtime environment, because Oracle's Java RPMs are incorrect and fail to register as providing a java dependency. Thus, adding an explicit dependency requirement on Java would force installation of the OpenJDK JVM.

Operation:

    yum install jenkins

3. 修改Jenkins启动配置文件,指定java安装路径:vim /etc/init.d/jenkins

在candidates中第一行添加java路径,如下:

 

 4.修改防火墙允许8080端口访问:vim /etc/sysconfig/iptables 加入:-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT 重启防火墙:sudo service iptables restart

5.在浏览器中访问,初始密码在:/var/lib/jenkins/secrets/initialAdminPassword

6.地址栏输入:http://ip/port 不要带jenkins,会报404错。 

 

转载于:https://www.cnblogs.com/junlinqunxia/p/9372466.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值