说明
jenkins安装目录:/var/lib/jenkins
jenkins日志目录:/var/log/jenkins/jenkins.log
jenkins默认配置:/etc/default/jenkins
配置root启动(不建议)
# 设置权限
sudo chown -R root:root /var/lib/jenkins/*
# 修改配置:/etc/default/jenkins
sudo vi /etc/default/jenkins
# 把以下两个值改为root,默认是$NAME
JENKINS_USER=root
JENKINS_GROUP=root
# 重启Jenkins
sudo systemctl restart jenkins