- 检查jdk环境,jenkins依赖
- 查询jdk:apt-cache search jdk
- 选择安装jdk:apt-get install -y apt-get install openjdk-8-jdk
- jenkins安装(检查jdk环境是否正常安装)
- 增加存储密钥添加到系统:
- wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
- 讲debian包存储附加到服务
- sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
- 更新储存库
- apt-get update
- 安装jenkins
- apt-get install jenkins
- 启动jenkins (端口修改可以到 /etc/default/jenkins 修改 HTTP_PORT属性)
- systemctl start jenkins
- 查看状态
- systemctl status jenkins
- 增加存储密钥添加到系统:
访问地址:http:地址:端口