When using CentOS 7 & 8, the server will run a System Journal. It is useful for troubleshooting issues when services are failing. There are times where these logs may not be available.
The systemd journal is configured by default to store logs only in a small ring-buffer in /run/log/journal, which is not persistent
Journal database logs do not survive a system reboot
The following procedure will show the method used to make the log 'persistent'.
The configuration file is part of 'systemd', a core server system. cPanel support won't perform this action on your behalf. We strongly recommend having a qualified system administrator make the following change. This procedure is presenting information for your benefit.
1. Log in the server via SSH as 'root'.
2. Backup the following file (to a safe location):
3. Once complete, modify the file with a text-based editor that does not add CRLF metadata.
4. In the /etc/systemd/journald.conf file, change the following line (removing the # sign):
5. Save the file.
6. Load new change into systemd using the following command:
From this point, the journalctl logs will remain on the server after reboot.
To view the log, use the following command: