The command to check last boot’s journal log shows nothing on CentOS 7:
检查上一次启动的日志日志的命令在CentOS 7上未显示任何内容:
# journalctl -b -1
Failed to look up boot -1: No such boot ID in journal
Is the log stored and where it is?
日志是否存储在哪里?
The reason this happens on CentOS 7 is that CentOS 7 by default does not enable the persistent storage of log messages. You can enable it and configure journald to store the log files into `/var/log/journal` by
在CentOS 7上发生这种情况的原因是,默认情况下CentOS 7不启用日志消息的持久存储 。 您可以启用它并配置日记日志,以通过以下方式将日志文件存储到`/ var / log / journal`中:
# mkdir /var/log/journal
# systemd-tmpfiles --create --prefix /var/log/journal
# systemctl restart systemd-journald
翻译自: https://www.systutorials.com/how-to-check-last-boots-systemd-journal-log-in-centos-7-linux/