Introduction
When using an OS with systemd
, such as CentOS 7 or Ubuntu 20, the server will run a System Journal, which is useful for troubleshooting issues when services fail. The systemd
journal is configured by default to store logs only in a small ring buffer (/run/log/journal
), which is not persistent. The following procedure will show the method used to make the log persistent.
Procedure
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 changes. This procedure presents information for your benefit.
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Backup the
/etc/systemd/journald.conf
configuration file. - Open the
/etc/systemd/journald.conf
configuration file with a text-based editor that does not add CRLF metadata. - Locate the
Strorage
line.#Storage=auto
- Remove the
#
from the line and set the value topersistent
.Storage=persistent
- Save the changes and exit the text editor.
- Run the following command to Load the change into
systemd
.systemctl daemon-reexec