/var/log/messages中没有日志
修改syslog配置文件并重启
sudo vi /etc/rsyslog.conf 找到此行:#$ModLoad imklog # reads kernel messages (the same are read from journald) 修改为:$ModLoad imklog # reads kernel messages (the same are read from journald) 找到此行:$OmitLocalLogging on 修改为:#$OmitLocalLogging on 找到此行:$IMJournalStateFile imjournal.state 修改为:#$IMJournalStateFile imjournal.state 重启日志服务:sudo systemctl restart rsyslog sudo tail -f /var/log/messages 发现有输入信息了 centos7默认$ModLoad imklog # reads kernel messages (the same are read from journald)是注释的
浙公网安备 33010602011771号