Безопасность и оптимизация Linux.Редакция для Red Hat

Конфигурация файла “/etc/logrotate.d/squid”


Настроим ваш файл “/etc/logrotate.d/squid” для автоматической ротации файлов регистраций каждую неделю.

Создайте файл squid (touch /etc/logrotate.d/squid) и добавьте в него:

/var/log/squid/access.log { weekly rotate 5 copytruncate compress notifempty missingok } /var/log/squid/cache.log { weekly rotate 5 copytruncate compress notifempty missingok } /var/log/squid/store.log { weekly rotate 5 copytruncate compress notifempty missingok # This script asks squid to rotate its logs on its own. # Restarting squid is a long process and it is not worth # doing it just to rotate logs postrotate /usr/sbin/squid -k rotate endscript }



Содержание раздела