Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


admin_grundlagen:logrotate

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu der Vergleichsansicht

admin_grundlagen:logrotate [2013/09/19 12:11]
stefan_miethke
admin_grundlagen:logrotate [2018/10/09 19:16]
Zeile 1: Zeile 1:
-Vorraussetzung:​ [[cron]] 
-  * ''/​etc/​logrotate.conf''​ 
-  * ''/​etc/​logrotate.d/​*''​ 
- 
-===== Neue Logdatei zu logrotate hinzufügen ===== 
-=== Debian 5.0 === 
-''/​etc/​logrotate.d/​ingo''​ : 
-<​file>​ 
-/​var/​log/​ingo.log { 
-    compress 
-    size=+10 
-    postrotate 
-        /​etc/​init.d/​rsyslog reload > /dev/null 
-    endscript 
-} 
-</​file>​ 
-=== Ubuntu 12.04 === 
-''/​etc/​logrotate.d/​ingo''​ : 
-<​file>​ 
-/​var/​log/​ingo.log { 
-    compress 
-    size=+10 
-    postrotate 
-      reload rsyslog >/​dev/​null 2>&1 || true 
-    endscript 
-} 
-</​file>​ 
-=== SuSE 12.3 === 
-''/​etc/​logrotate.d/​ingo''​ : 
-<​file>​ 
-/​var/​log/​ingo.log { 
-    compress 
-    size=+10 
-    nodateext 
-    postrotate 
-        /​usr/​bin/​systemctl reload syslog.service > /dev/null 
-    endscript 
-} 
-</​file>​ 
- 
-=== CentOS 6 === 
-''/​etc/​logrotate.d/​ingo''​ : 
-<​file>​ 
-/​var/​log/​ingo.log { 
-  size=+10 
-  dateformat %Y%m%d-%s 
-  sharedscripts 
-  postrotate 
-    /bin/kill -HUP `cat /​var/​run/​syslogd.pid 2> /dev/null` 2> /dev/null || true 
-  endscript 
-} 
-</​file>​ 
- 
-==== testen ==== 
-  echo 12345678901234567890 >> /​var/​log/​ingo.log 
-  logrotate /​etc/​logrotate.conf 
-  ls /​var/​log/​ingo.log* 
- 
- 
- 
  
admin_grundlagen/logrotate.txt · Zuletzt geändert: 2018/10/09 19:16 (Externe Bearbeitung)