Difference between revisions of "Limit the size of .log files & the journal/ru"

Created page with "Когда пакетам необходимо настроить конфигурацию - они могут установить фрагменты конфигурации..."
(Created page with "Примечание: '''etc/systemd/journald.conf.d/*.conf''' переопределяет файл '''journald.conf'''")
(Created page with "Когда пакетам необходимо настроить конфигурацию - они могут установить фрагменты конфигурации...")
Line 52: Line 52:
'''man journald.conf'''
'''man journald.conf'''


When packages need to customize the configuration, they can install configuration snippets in
Когда пакетам необходимо настроить конфигурацию - они могут установить фрагменты конфигурации в /usr/lib/systemd/*.conf.d/. Файлы в /etc/ зарезервированы для локального администратора, который может использовать эту логику для переопределения конфигурационных файлов, установленных пакетами вендора. Главный конфигурационный файл читается перед любым из каталогов конфигурации и имеет наименьший приоритет; записи в файле в любом каталоге конфигурации переопределяют записи в единственном файле конфигурации. Файлы в подкаталоге конфигурации *.conf.d/ сортируются по имени файла в лексикографическом порядке, независимо от того, в каком из подкаталогов они находятся. Если в нескольких файлах указана одна и та же опция, приоритет имеет запись в файле с самым лексикографически последним именем. Рекомендуется снабжать все имена файлов в этих подкаталогах двузначным числом и тире для упрощения упорядочивания файлов.
/usr/lib/systemd/*.conf.d/. Files in /etc/ are reserved for the local administrator, who may use
this logic to override the configuration files installed by vendor packages. The main configuration
file is read before any of the configuration directories, and has the lowest precedence; entries in
a file in any configuration directory override entries in the single configuration file. Files in
the *.conf.d/ configuration subdirectories are sorted by their filename in lexicographic order,
regardless of which of the subdirectories they reside in. If multiple files specify the same option,
the entry in the file with the lexicographically latest name takes precedence. It is recommended to
prefix all filenames in those subdirectories with a two-digit number and a dash, to simplify the
ordering of the files.


What that means is that you can create configuration files '''.conf''' in the '''/etc/systemd/journald.conf.d/''' directory, with suitable names of your choice. The content of these files take precedence over any other settings or configurations in systemd. Please bear that in mind when you read the following? In my cumbersome way I've tried to make it all too obvious...
What that means is that you can create configuration files '''.conf''' in the '''/etc/systemd/journald.conf.d/''' directory, with suitable names of your choice. The content of these files take precedence over any other settings or configurations in systemd. Please bear that in mind when you read the following? In my cumbersome way I've tried to make it all too obvious...
translator
10,791

edits