由于jenkins默认存放数据的目录是/var/lib/jenkins,一般这个var目录的磁盘空间很小的,就几十G,所以需要修改jenkins的默认工作空间workspace
环境
[root@localhost jenkins_old_data]# rpm -ql jenkins /etc/init.d/jenkins /etc/logrotate.d/jenkins /etc/sysconfig/jenkins /usr/lib/jenkins /usr/lib/jenkins/jenkins.war /usr/sbin/rcjenkins /var/cache/jenkins /var/lib/jenkins /var/log/jenkins
先关闭jenkins服务
# vi /etc/sysconfig/jenkins 将JENKINS_HOME修改为你需要的即查
systemctl daemon-reload 使得配置生效 service jenkins restart 重启jenkins chkconfig jenkins on 设置开机自启动