Centos8安装Jenkins
安装Jenkins:
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:04:08 前,执行于 2021年11月06日 星期六 05时51分16秒。
错误:
问题: cannot install the best candidate for the job
– nothing provides daemonize needed by jenkins-2.303.3-1.1.noarch
(尝试添加 ‘–skip-broken’ 来跳过无法安装的软件包 或 ‘–nobest’ 来不只使用软件包的最佳候选)
解决问题:yum install jenkins -y –nobest
查看安装目录:rpm -ql jenkins
jenkins配置文件:/etc/sysconfig/jenkins
代码存放目录:/var/lib/jenkins
jenkins日志目录:/var/log/jenkins
启动Jenkins:systemctl start jenkins
jenkins初始化配置:
出现离线安装解决方法
修改:/var/lib/jenkins/updates/default.json,将google.com修改为baidu.com 修改:/var/lib/jenkins/hudson.model.UpdateCenter.xml,将https修改为http