Syslog-ng 2 in FreeBSD 6.x

Last modified: Aug. 4, 2008

1 - Summary
2 - Syslog-ng installation
3 - Service configuration
4 - Service check

1 - Summary

This little guide will show you how to install syslog-ng 2 in FreeBSD 6.x. For
this guide to work you will need to be running FreeBSD 6.x.

2 - Syslog-ng installation

Update the ports tree using cvsup. Now, install the syslog-ng2 port.
# sudo cvsup -g -L 2 /usr/local/etc/cvsup/sup/ports-supfile
# cd /usr/ports/sysutils/syslog-ng2
# sudo make
# sudo make install
# sudo make clean

3 - Service configuration

Rename the startup configuration file so the syslog-ng service will start
# sudo mv /usr/local/etc/rc.d/syslog-ng /usr/local/etc/rc.d/001-syslog-ng

Edit /etc/rc.conf.local so that syslog-ng will start when the system starts
up and not syslog. Somewhere in the file add the following:

  syslog_ng_config="-f /usr/local/etc/syslog-ng/syslog-ng.conf"

# sudo vi /etc/rc.conf.local

You can now create your own syslog-ng.conf file if you like. You can use the
following for your source.

  source local { internal(); file("/dev/klog" log_prefix("kernel: ")); unix-dgram("/var/run/log"); };

# sudo vi /etc/syslog-ng/syslog-ng.conf

Stop the syslog service and start the syslog-ng service.
# sudo kill -9 `cat /var/run/`
# sudo /usr/local/etc/rc.d/001-syslog-ng start
# sudo /usr/local/etc/rc.d/001-syslog-ng start
Starting syslog_ng.

4 - Service check

Reboot your computer. Log in like normal and check to see that the syslog
service isn't running and the syslog-ng service is running. That's it, now you
have syslog-ng 2 running on FreeBSD 6.x.
# sudo shutdown -r now
# sudo cat /var/run/
cat: /var/run/ No such file or directory
# sudo /usr/local/etc/rc.d/001-syslog-ng status
syslog_ng is running as pid 601.

Last modified: Thu Jan 1 00:00:00 1970 UTC
Packetwatch Research 2002-2017.