最新版本的 Jenkins 修改 /etc/sysconfig/jenkins 中的 JENKINS_USER=root不会再生效,需要按照以下配置进行操作:
shell
vim /usr/lib/systemd/system/jenkins.service

然后重启就可以了
shell
systemctl daemon-reload # 重新加载 systemd 的配置文件
systemctl restart jenkins # 重启 Jenkins