I'm having some trouble with a Cent OS 7 box.
The problems just started last week and I have made no changes to the server.
The disk keeps filling up several times a day from 83% to 100%.
As soon as it is full, Nginx can't generate full webpages.
If I run "yum clean all" the disk goes back to 83% and everything runs fine again.
I'm not run daily yum updates, so I'm not sure why "yum clean all" fixes it.
Any ideas how I can troubleshoot and stop this?
答案 0 :(得分:0)
您必须拥有yum-cron软件包,每天检查(使用/etc/cron.daily/0yum-daily.cron)以获取更新并默认下载。
默认情况下,在/etc/yum/yum-cron.conf中:
download_updates = yes
apply_updates = no
您可以将yum-cron配置为应用它们,或者向您发送电子邮件,以便您可以手动应用它们并清理,而不是在上次清理后每天重新下载每个更新。
您可以使用http://diskreport.net等工具来诊断空间使用量在两个日期之间增长的位置
答案 1 :(得分:0)
我最终完成了一项cron作业,即每小时要通过cron删除文件和文件夹。
Login as root
crontab -e
# Every hour
0 * * * * /bin/rm -rf /var/cache/yum/*