Changeset 14ba5f4 for general/sysutils/logrotate.xml
- Timestamp:
- 01/27/2016 06:00:53 PM (8 years ago)
- Branches:
- systemd-13485
- Children:
- 8cf08a11
- Parents:
- 4c7c1d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general/sysutils/logrotate.xml
r4c7c1d4 r14ba5f4 31 31 32 32 <para> 33 The <application>logrotate</application> package allows automatic rotation, 34 compression, removal, and mailing of log files. 35 </para> 36 37 &lfs7 7_checked;33 The <application>logrotate</application> package allows automatic rotation, 34 compression, removal, and mailing of log files. 35 </para> 36 37 &lfs78_checked; 38 38 39 39 <bridgehead renderas="sect3">Package Information</bridgehead> … … 106 106 107 107 <para> 108 To test the results, issue: <command>make test</command>. 108 To test the results, issue: <command>make test</command>. 109 109 </para> 110 110 … … 130 130 <title>Configuring Logrotate</title> 131 131 132 <para><application>Logrotate</application> needs a configuration file, 133 which must be passed as an argument to the command when executed. Create 132 <para><application>Logrotate</application> needs a configuration file, 133 which must be passed as an argument to the command when executed. Create 134 134 the file as the <systemitem class="username">root</systemitem> user:</para> 135 135 … … 177 177 EOF 178 178 179 chmod -v 644 /etc/logrotate.conf</userinput></screen>180 181 <para>Now create the <filename class= "directory">/etc/logrotate.d</filename>179 chmod -v 0644 /etc/logrotate.conf</userinput></screen> 180 181 <para>Now create the <filename class='directory'>/etc/logrotate.d</filename> 182 182 directory as the <systemitem class="username">root</systemitem> user:</para> 183 183 184 <screen role="root"><userinput> mkdir -p /etc/logrotate.d</userinput></screen>185 186 <para>At this point additional log rotation commands can be entered, typically 187 in the <filename class= "directory">/etc/logrotate.d</filename> directory.184 <screen role="root"><userinput> mkdir -p /etc/logrotate.d</userinput></screen> 185 186 <para>At this point additional log rotation commands can be entered, typically 187 in the <filename class='directory'>/etc/logrotate.d</filename> directory. 188 188 For example:</para> 189 189 … … 200 200 EOF 201 201 202 chmod -v 644 /etc/logrotate.d/sys.log</userinput></screen>202 chmod -v 0644 /etc/logrotate.d/sys.log</userinput></screen> 203 203 204 204 <para>You can designate multiple files in one entry:</para> … … 215 215 EOF 216 216 217 chmod -v 644 /etc/logrotate.d/example.log</userinput></screen>217 chmod -v 0644 /etc/logrotate.d/example.log</userinput></screen> 218 218 219 219 <para>You can use in the same line the list of files: file1 file2 file3. 220 See the logrotate man page or 221 <ulink url= "http://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/"/>220 See the logrotate man page or 221 <ulink url='http://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/'/> 222 222 for more examples.</para> 223 223 … … 232 232 because they are not actually created.</para> 233 233 234 <para>To set up <xref linkend= "fcron"/> to run234 <para>To set up <xref linkend='fcron'/> to run 235 235 <command>logrotate ...</command> at 3AM daily, root's crontab should be 236 236 edited to add:</para> … … 265 265 <listitem> 266 266 <para> 267 performs the log maintenance functions defined in the 267 performs the log maintenance functions defined in the 268 268 configuration files. 269 269 </para>
Note:
See TracChangeset
for help on using the changeset viewer.