docker jenkins权限恢复
2020-01-10 16:30 Tanwheey 阅读(387) 评论(0) 编辑 收藏 举报1、进入JENKINS_HOME目录,找到config.xml文件,打开config.xml:
#cd /
#find -name "config.xml"
./home/admin/.jenkins/config.xml
#cp config.xml configbak.xml
#vi ./home/admin/.jenkins/config.xml
<useSecurity>true</useSecurity> <authorizationStrategy class="hudson.security.AuthorizationStrategy$Unsecured"/> <securityRealm class="hudson.security.HudsonPrivateSecurityRealm"> <disableSignup>true</disableSignup> <enableCaptcha>false</enableCaptcha> </securityRealm>
2、命令行重启jenkins
#/home/admin/start.sh #重启jenkins
注意:此时不可在链接后/restart进行重启。
3、docker执行/home/admin/start_after.sh中Java进程不生效的方案
切换用户root>admin 用户需要source一下Java
source /etc/profile && \
cd /export/servers && \
wget ftp://jenkins:jenkins@172.20.145.21/repo/green_bee/green_bee.tgz && \
tar -xf green_bee.tgz && \
sh /export/servers/green_bee/bin/gather.sh start
------------------------------------------------------Tanwheey-------------------------------------------------------------------------
爱生活,爱工作。