1. 题目
2. 解题
这题红帽标准做法是把/usr/lib/systemd/system/sysstat-collect.timer拷贝到/etc/systemd/system/sysstat-collect.timer再修改etc/systemd/system/sysstat-collect.timer的内容
我们考试或者练习为了节约时间也可以直接修改源文件,效果是一样的.如果是生产环境建议按红帽的标准做法做.
vim /usr/lib/systemd/system/sysstat-collect.timer
改成3就可以,当然用sed命令也可以.看个人喜好.
最后记得reload并把服务设置为自动启动,考试环境中sysstat是disabled的并且没有启动
systemctl enable --now sysstat
systemctl enable --now sysstat-collect.timer
systemctl restart sysstat-collect.timer
3. 确认
systemctl status sysstat
systemctl status sysstat-collect.timer