![]() |
| home > logrotate インストール |
[root@ns1 ~]# cd /usr/ports/sysutils/logrotate [root@ns1 logrotate]# make install clean [root@ns1 logrotate]# cd
[root@ns1 ~]# cp /usr/local/etc/logrotate.conf.sample /usr/local/etc/logrotate.conf [root@ns1 ~]# vi /usr/local/etc/logrotate.conferrors root ↓ #errors root ←コメントアウト compress ↓ #compress ←コメントアウト ↓下記をコメントアウト #/var/log/lastlog { # monthly # rotate 1 #}
[root@ns1 ~]# mkdir /usr/local/etc/logrotate.d
[root@ns1 ~]# vi /etc/crontab↓最終行に下記を記入 0 0 * * * root /usr/local/sbin/logrotate /usr/local/etc/logrotate.conf > /dev/null 2>&1
ヒント /usr/local/sbin/logrotate -d /usr/local/etc/logrotate.conf ←ステータス更新。 /usr/local/sbin/logrotate -f /usr/local/etc/logrotate.conf ←ローテーション強制実行。
![]() |
![]() |
![]() |
Last updated 2008-08-01 |

