centos7离线安装Jenkins-rpm方式
参考博客:http://www.manongjc.com/detail/28-nfkmqzliqujvfof.html
Jenkins有多种安装方式,下面通过rpm进行安装
前提:Java 的jdk已安装
一、下载Jenkins的rpm包
下载地址:https://jenkins.io/zh/download/
或者https://mirrors.tuna.tsinghua.edu.cn/jenkins/redhat-stable/
二、安装rpm包及配置
1、安装
rpm -ivh jenkins-2.319.1-1.1.noarch.rpm
2、配置
vim /etc/sysconfig/jenkins 添加端口号
JENKINS_PORT=“8080”
vi /etc/init.d/jenkins 编辑Jenkins配置文件,添加jdk的Java路径
3、启动
systemctl daemon-reload
systemctl start jenkins
报错Job for jenkins.service failed because the control process exited with error code. See “systemctl status jenkins.service” and “journalctl -xe” for details.
systemctl status jenkins.service
没有daemonize 这个命令, 安装好daemonize,重新加载配置,再启动
yum install -y daemonize