Packetwatch.net

Syslog-ng in Mythbuntu



Last modified: Jun. 3, 2012

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


1 - Summary

This guide will show how to install syslog-ng in Mythbuntu. Syslog-ng is a
system logging application. This has been tested in Mythbuntu 12.04.


2 - Dependencies

Install the apt-file package.
# sudo apt-get install apt-file
[sudo] password for user:


3 - Syslog-ng installation

Install the syslog-ng package.
# sudo apt-get install syslog-ng
[sudo] password for user: 


4 - Service configuration

Stop the syslog-ng service as it was started after the installation.
# sudo service syslog-ng stop
[sudo] password for user: 
 * Stopping system logging syslog-ng

Find where the syslog-ng daemon was installed to.
# apt-file update
# apt-file list syslog-ng-core | awk '{print $2}' | grep sbin
/usr/sbin/syslog-ng
/usr/sbin/syslog-ng-ctl

Enable the syslog-ng service so that it will start when the system up.
# sudo update-rc.d syslog-ng enable
[sudo] password for user:

You can now create your own syslog-ng.conf configuration file. You can use the
following for your source.
  source local { internal(); file("/proc/kmsg" program-override("kernel") \
    flags(no-parse)); unix-stream("/dev/log"); };
# apt-file list syslog-ng-core | awk '{print $2}' | grep syslog-ng.conf
/etc/syslog-ng/syslog-ng.conf
# sudo cp /etc/syslog-ng/syslog-ng.conf /etc/syslog-ng/syslog-ng.conf.example
[sudo] password for user: 
# sudo vi /etc/syslog-ng/syslog-ng.conf
[sudo] password for user: 
# sudo /usr/sbin/syslog-ng -s -f /etc/syslog-ng/syslog-ng.conf
[sudo] password for user: 

Start the syslog-ng service.
# sudo service syslog-ng start
[sudo] password for user: 
 * Starting system logging syslog-ng [ OK ]
# sudo cat /var/run/syslog-ng.pid 
[sudo] password for user: 
10312


5 - Service check

Reboot your computer. Log in like normal and check to see that the syslog-ng is
running. That's it, now you have syslog-ng running in Mythbuntu.
# sudo shutdown -r now
[sudo] password for user: 
# sudo service syslog-ng status
[sudo] password for user: 
 * syslog-ng is running


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