Configuring the systemd journal for persistence
By default, the journal doesn't store log files on disk, only in memory or the /run/log/journal
directory. This is sufficient for the recent log history (with the journal) but not for long-term log retention should you decide to go with journal only and not with any other syslog
solution.
How to do it…
Configuring journald
to keep more logs than memory allows is fairly simple, as follows:
- Open
/etc/systemd/journald.conf
with your favorite text editor with root permissions by executing the following command:~]# vim /etc/systemd/journald.conf
- Ensure that the line containing
Storage
is either remarked or set toauto
orpersistent
and save it, as follows:Storage=auto
- If you select
auto
, the journal directory ...
Get Red Hat Enterprise Linux Server Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.