centos安装jenkins
一、centOs安装jenkins步骤:
1、下载jenkins
2、rpm -ivh rpm包
3、vi /etc/sysconfig/jenkins 修改8080端口
4、检查jenkins是否配置jdk,在candidates后面加上自己的jdk路径 命令:vi /etc/rc.d/init.d/jenkins
5、关闭防火墙 systemctl stop firewalld.service
6、启动服务 service jenkins start
7、访问localhost:8088
8、首次访问,需要输入密码,密码通常路径:/var/lib/jenkins/secrets/initialAdminPassword
9、密码:yangld 59a2fb0e0e3b4078b207e2a3ee489f04
二、查找java安装的路径
1、which java
2、ls -lrt /usr/bin/java
3、ls -lrt /etc/alternatives/java
三、centos7关闭防火墙
1、systemctl stop firewalld.service #停止firewall
2、systemctl disable firewalld.service #禁止firewall开机启动
3、firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
问题记录:
1、Jenkins密码忘记了,以下的处理方式:
1>cd /var/lib/jenkins/config.xml
2>删除以下内容:
<useSecurity>true</useSecurity>
<authorizationStategy class="hudson.sucrity.FullControlOnceLoggedInAuthorizationStrategy">
......
</authorizationStategy>
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>false</disableSignup>
..
</securityRealm>