syslog-ng導入の手順
sudo portinstall /usr/ports/sysutils/syslog-ng3
1. Create a configuration file named /usr/local/etc/syslog-ng.conf
(a sample named syslog-ng.conf.sample has been included in
/usr/local/etc/syslog-ng). Note that this is a change in 2.0.2
version, previous ones put the config file in
/usr/local/etc/syslog-ng/syslog-ng.conf, so if this is an update
move that file in the right place
2. Configure syslog-ng to start automatically by adding the following
to /etc/rc.conf:
syslog_ng_enable=”YES”
3. Prevent the standard FreeBSD syslogd from starting automatically by
adding a line to the end of your /etc/rc.conf file that reads:
syslogd_enable=”NO”
4. Shut down the standard FreeBSD syslogd:
kill `cat /var/run/syslog.pid`
5. Start syslog-ng:
/usr/local/etc/rc.d/syslog-ng start
sudo cp /usr/local/etc/syslog-ng/syslog-ng.conf.sample /usr/local/etc/syslog-ng.conf
sudo ee /etc/rc.conf
syslog_ng_enable=”YES”
syslogd_enable=”NO”
sudo ee /usr/local/etc/syslog-ng.conf
#サンプルのコンフィグファイルのバージョンが古いので書き換える必要がある。
#先頭行にバージョン
@version:3.0
#syncオプションはflush_linesに変更になった。
# このオプションはログをファイルに書き込む前にバッファするメッセージ数の指定する。
#permオプションはsyslog-ngが出力するファイルのデフォルトのパーミッションを指定する。デフォルトは0600。
# destinationの項目でそれぞれ個別に指定しても良い。
< options { long_hostnames(off); sync(0); };
—
> options { long_hostnames(off); flush_lines(0); perm(0644); };
http://www.balabit.com/dl/html/syslog-ng-admin-guide_en.html/index.html
この投稿へのトラックバック
トラックバックはありません。
- トラックバック URL
この投稿へのコメント