CentOS 8 отсутствует messages и secure

На CentOS 8 (CentOS Linux release 8.2.2004 (Core)) не обнаружил файлов messages и secure в дериктории var/log/. Очень хотелось бы узнать почему их там нету? И как сделать так, что бы всё таки логирование было в файлах messages и secure?


Ответы (2 шт):

Автор решения: Sergey

Не знаю насчёт CentOS, но поскольку он основан на RedHat, то (IMHO) в нём так же, как и в fedora, этих файлов действительно нет. А в каталоге /var/log лежит файл README, в котором написано:

You are looking for the traditional text log files in /var/log, and they are gone?

Here's an explanation on what's going on:

You are running a systemd-based OS where traditional syslog has been replaced with the Journal. The journal stores the same (and more) information as classic syslog. To make use of the journal and access the collected log data simply invoke "journalctl", which will output the logs in the identical text-based format the syslog files in /var/log used to be. For further details, please refer to journalctl(1).

→ Ссылка
Автор решения: eri

Ищите логи в журнале (journalctl). Последние годы только и делаю что отключаю запись в messages. Включить можно через

systemctl enable rsyslog
systemctl start rsyslog

И проверь настройку /etc/systemd/journald.conf что там включёно перенаправление в сислог

→ Ссылка