jenkins安装
一、linux安装
1.先下载repo的安装包 : sudo wget --no-check-certificate -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
2.再下载秘钥:sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
3.安装执行 :yum install jenkins
4.自动安装目录:
/usr/lib/jenkins/jenkins.war WAR包
/etc/sysconfig/jenkins 配置文件
/var/lib/jenkins/ 默认的JENKINS_HOME目录
/var/log/jenkins/jenkins.log Jenkins日志文件
5.配置环境:
配置jdk # vim /etc/init.d/jenkins 添加jdk安装路径到配置文件
vim /etc/sysconfig/jenkin
设置用户:root
设置端口号: 9010
6.查看配置信息:
grep -n '^'[[a-Z] /etc/sysconfig/jenkins
7.Jenkins服务启动
# systemctl daemon-reload //重新启动
# systemctl start jenkins.service //启动jenkins
# systemctl enable jenkins.service //设置jenkins开机启动
# systemctl stop jenkins.service //关闭jenkins
# systemctl status jenkins.service //查看jenkins的状态
8.
9.卸载:
# rpm -e jenkins rpm卸载
# rpm -ql jenkins 检查是否卸载成功
# find / -iname jenkins | xargs -n 1000 rm -rf 彻底删除残留文件
二、windows安装
1. 下载war包 。http://mirrors.jenkins-ci.org/war/latest/jenkins.war
2. 初始化密码:1315d8e7f4ab466080ed918d86f15f20