[10658db] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-rsyslog" xreflabel="rsyslog" role="wrap">
|
---|
| 9 | <?dbhtml filename="rsyslog.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Rsyslog-&rsyslog-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-rsyslog">
|
---|
| 14 | <primary sortas="a-rsyslog">rsyslog</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
| 19 |
|
---|
| 20 | <para>The rsyslog package contains programs for logging system messages,
|
---|
| 21 | such as those given by the kernel when unusual things happen.</para>
|
---|
| 22 |
|
---|
| 23 | </sect2>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="installation">
|
---|
| 26 | <title>Installation of Rsyslog</title>
|
---|
| 27 |
|
---|
| 28 | <para os="a">Prepare Rsyslog for compilation:</para>
|
---|
| 29 |
|
---|
| 30 | <screen os="b"><userinput>./configure --prefix=/usr --sbindir=/sbin</userinput></screen>
|
---|
| 31 |
|
---|
| 32 | <para os="c">Compile the package:</para>
|
---|
| 33 |
|
---|
| 34 | <screen os="d"><userinput>make</userinput></screen>
|
---|
| 35 |
|
---|
| 36 | <para os="e">This package does not come with a test suite.</para>
|
---|
| 37 |
|
---|
| 38 | <para os="f">Install the package:</para>
|
---|
| 39 |
|
---|
[2036ece] | 40 | <screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
|
---|
[10658db] | 41 |
|
---|
| 42 | <para os="h">Create a directory for expansion snippets:</para>
|
---|
| 43 |
|
---|
| 44 | <screen os="i"><userinput>install -dv ${CLFS}/etc/rsyslog.d</userinput></screen>
|
---|
| 45 |
|
---|
| 46 | </sect2>
|
---|
| 47 |
|
---|
| 48 | <sect2 id="conf-rsyslog" role="configuration">
|
---|
| 49 | <title>Configuring rsyslog</title>
|
---|
| 50 |
|
---|
| 51 | <indexterm zone="conf-rsyslog">
|
---|
| 52 | <primary sortas="a-rsyslog">rsyslog</primary>
|
---|
| 53 | <secondary>configuring</secondary></indexterm>
|
---|
| 54 |
|
---|
| 55 | <indexterm zone="conf-rsyslog">
|
---|
| 56 | <primary sortas="e-/etc/rsyslog.conf">/etc/rsyslog.conf</primary>
|
---|
| 57 | </indexterm>
|
---|
| 58 |
|
---|
| 59 | <para>Create a new <filename>/etc/rsyslog.conf</filename> file by running
|
---|
| 60 | the following:</para>
|
---|
| 61 |
|
---|
| 62 | <screen><userinput>cat > ${CLFS}/etc/rsyslog.conf << "EOF"
|
---|
| 63 | <literal># Begin /etc/rsyslog.conf
|
---|
| 64 |
|
---|
| 65 | # CLFS configuration of rsyslog. For more info use man rsyslog.conf
|
---|
| 66 |
|
---|
| 67 | #######################################################################
|
---|
| 68 | # Rsyslog Modules
|
---|
| 69 |
|
---|
| 70 | # Support for Local System Logging
|
---|
| 71 | $ModLoad imuxsock.so
|
---|
| 72 |
|
---|
| 73 | # Support for Kernel Logging
|
---|
| 74 | $ModLoad imklog.so
|
---|
| 75 |
|
---|
| 76 | #######################################################################
|
---|
| 77 | # Global Options
|
---|
| 78 |
|
---|
| 79 | # Use traditional timestamp format.
|
---|
| 80 | $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
---|
| 81 |
|
---|
| 82 | # Set the default permissions for all log files.
|
---|
| 83 | $FileOwner root
|
---|
| 84 | $FileGroup root
|
---|
| 85 | $FileCreateMode 0640
|
---|
| 86 | $DirCreateMode 0755
|
---|
| 87 |
|
---|
| 88 | # Provides UDP reception
|
---|
| 89 | $ModLoad imudp
|
---|
| 90 | $UDPServerRun 514
|
---|
| 91 |
|
---|
| 92 | # Disable Repating of Entries
|
---|
| 93 | $RepeatedMsgReduction on
|
---|
| 94 |
|
---|
| 95 | #######################################################################
|
---|
| 96 | # Include Rsyslog Config Snippets
|
---|
| 97 |
|
---|
| 98 | $IncludeConfig /etc/rsyslog.d/*.conf
|
---|
| 99 |
|
---|
| 100 | #######################################################################
|
---|
| 101 | # Standard Log Files
|
---|
| 102 |
|
---|
[e60e52d] | 103 | auth,authpriv.* /var/log/auth.log
|
---|
| 104 | *.*;auth,authpriv.none -/var/log/syslog
|
---|
| 105 | daemon.* -/var/log/daemon.log
|
---|
| 106 | kern.* -/var/log/kern.log
|
---|
| 107 | lpr.* -/var/log/lpr.log
|
---|
| 108 | mail.* -/var/log/mail.log
|
---|
| 109 | user.* -/var/log/user.log
|
---|
[10658db] | 110 |
|
---|
| 111 | # Catch All Logs
|
---|
| 112 | *.=debug;\
|
---|
[e60e52d] | 113 | auth,authpriv.none;\
|
---|
| 114 | news.none;mail.none -/var/log/debug
|
---|
[10658db] | 115 | *.=info;*.=notice;*.=warn;\
|
---|
[e60e52d] | 116 | auth,authpriv.none;\
|
---|
| 117 | cron,daemon.none;\
|
---|
| 118 | mail,news.none -/var/log/messages
|
---|
[10658db] | 119 |
|
---|
| 120 | # Emergency are shown to everyone
|
---|
[e60e52d] | 121 | *.emerg *
|
---|
[10658db] | 122 |
|
---|
| 123 | # End /etc/rsyslog.conf</literal>
|
---|
| 124 | EOF</userinput></screen>
|
---|
| 125 |
|
---|
| 126 | </sect2>
|
---|
| 127 |
|
---|
| 128 | <sect2 id="contents-rsyslog" role="content">
|
---|
| 129 | <title>Contents of rsyslog</title>
|
---|
| 130 |
|
---|
| 131 | <segmentedlist>
|
---|
| 132 | <segtitle>Installed programs</segtitle>
|
---|
| 133 |
|
---|
| 134 | <seglistitem>
|
---|
| 135 | <seg>rsyslogd</seg>
|
---|
| 136 | </seglistitem>
|
---|
| 137 | </segmentedlist>
|
---|
| 138 |
|
---|
| 139 | <variablelist>
|
---|
| 140 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 141 | <?dbfo list-presentation="list"?>
|
---|
| 142 | <?dbhtml list-presentation="table"?>
|
---|
| 143 |
|
---|
| 144 | <varlistentry id="rsyslogd">
|
---|
| 145 | <term><command>rsyslogd</command></term>
|
---|
| 146 | <listitem>
|
---|
| 147 | <para>Logs the messages that system programs offer for logging.
|
---|
| 148 | Every logged message contains at least a date stamp and a hostname,
|
---|
| 149 | and normally the program's name too, but that depends on how
|
---|
| 150 | trusting the logging daemon is told to be.</para>
|
---|
| 151 | <indexterm zone="ch-system-rsyslog rsyslogd">
|
---|
| 152 | <primary sortas="b-rsyslogd">syslogd</primary>
|
---|
| 153 | </indexterm>
|
---|
| 154 | </listitem>
|
---|
| 155 | </varlistentry>
|
---|
| 156 |
|
---|
| 157 | </variablelist>
|
---|
| 158 |
|
---|
| 159 | </sect2>
|
---|
| 160 |
|
---|
| 161 | </sect1>
|
---|