Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i setup log rotate?

Status
Not open for further replies.

farley99

MIS
Feb 12, 2003
413
US
How do i setup log rotate? I wnat it to rotate all logs, do i have to specify each log file? Does anyone have examples?
 
To configure logrotate take a look at /etc/logrotate

more logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# send errors to root
errors root

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own lastlog or wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}

# system-specific logs may be configured here


Laurie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top