Skip to content

Instantly share code, notes, and snippets.

@Haoxiqiang
Created August 18, 2021 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Haoxiqiang/0ff958ba9a049a3ece01f02eaf06a66a to your computer and use it in GitHub Desktop.
Save Haoxiqiang/0ff958ba9a049a3ece01f02eaf06a66a to your computer and use it in GitHub Desktop.
jenkins rus as root user
1. change jenkins's config
vi /etc/sysconfig/jenkins
edit:
$JENKINS_USER="root"
2. change all files permisions
chown -R root:root /var/lib/jenkins
chown -R root:root /var/cache/jenkins
chown -R root:root /var/log/jenkins
3. restart jenkins
systemctl restart jenkins
4. check jenkins running status
ps -ef | grep jenkins
you will get the jenkins run as root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment