From 50f9d4a5d286fff80b4df38136c45bde5abcd4c4 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Tue, 10 Apr 2018 14:46:34 +0100 Subject: tools syslogng revision --- tools/syslog-ng.html | 132 ++++----------------------------------------------- 1 file changed, 10 insertions(+), 122 deletions(-) (limited to 'tools/syslog-ng.html') diff --git a/tools/syslog-ng.html b/tools/syslog-ng.html index e97b50d..f1ed95b 100644 --- a/tools/syslog-ng.html +++ b/tools/syslog-ng.html @@ -23,92 +23,17 @@ $ sudo tail -f messages kernel cron auth -

1.1. Install event log

+

1.1. Install syslog-ng

-        $ mkdir eventlog
-        $ vim Pkgfile
+        $ prt-get depinst syslog-ng
         
-
-        # Description: replacement of the simple syslog() API
-        # URL:         http://www.balabit.com/network-security/syslog-ng/opensource-logging-system
-        # Maintainer:  Thomas Penteker, tek at serverop dot de
-        #
-        # Depends on:
-
-        name=eventlog
-        version=0.2.12
-        release=1
-        source=(http://ftp.uni-erlangen.de/pub/mirrors/gentoo/distfiles/${name}_${version}.tar.gz)
-
-        build() {
-        cd $name-$version
-
-        ./configure \
-        --prefix=/usr \
-        --disable-nls \
-        --mandir=/usr/man
-
-        make && make DESTDIR=$PKG install
-        rm -rf $PKG/usr/doc
-        }
-        
- -
-        $ fakeroot pkgmk -d
-        $ sudo pkgadd /usr/ports/packages/eventlog#0.2.12-1.pkg.tar.gz
-        
- -

1.2. Install syslog-ng

+

1.4. Syslog-ng configuration

-
-        $ cd ..
-        $ mkdir syslog-ng
-        $ vim Pkgfile
-        
- -
-        # Description: alternate syslogging daemon
-        # URL:         http://www.balabit.com/network-security/syslog-ng/opensource-logging-system
-        # Packager:    c9 team, silvino at bk dot ru
-        # Depends on:  eventlog, glib, libwrap
-
-        name=syslog-ng
-        version=3.5.6
-        release=1
-        source=(http://balabit.com/downloads/files/syslog-ng/sources/$version/source/${name}_${version}.tar.gz
-        syslog-ng.rc syslog-ng.conf)
-
-        build() {
-           cd $name-$version
-
-           ./configure \
-              --prefix=/usr \
-              --sysconfdir=/etc \
-              --libexecdir=/var/libexec \
-              --localstatedir=/var \
-              --mandir=/usr/man \
-              --enable-dynamic-linking \
-              --sbindir=/sbin \
-              --enable-tcp-wraper
-
-
-           make && make DESTDIR=$PKG install
-           rm -rf $PKG/usr/doc
-           rm -rf $PKG/usr/share/include/scl/syslogconf/README
-           install -D -m 644 ../syslog-ng.conf $PKG/etc/syslog-ng.conf
-           install -D -m 755 ../syslog-ng.rc $PKG/etc/rc.d/syslog-ng
-        }
-        
- -
-        $ sudo prt-get depinst glib
-        $ pkgmk -um
-        $ pkgmk -uf
-        $ fakeroot pkgmk -d
-        $ sudo pkgadd /usr/ports/packages/syslog-ng#3.5.6-1.pkg.tar.gz
-        
+

Example of /etc/syslog-ng.conf + that configures syslog-ng matching tools already installed in the system + and some that are part of tools.

Change /etc/rc.conf, replace sysklog with syslog-ng;

@@ -122,48 +47,16 @@ TIMEZONE="Europe/Lisbon" HOSTNAME=box SYSLOG=syslog-ng - SERVICES=(syslog-ng lo net crond) + SERVICES=(lo net crond) # End of file -

1.3. Syslog-ng RC

- -
-        $ vim syslog-ng.rc
-        
-
-        #!/bin/sh
-        #
-        # /etc/rc.d/syslog-ng: start/stop syslog-ng logging daemon
-        #
-
-        case $1 in
-        start)
-          /sbin/syslog-ng -f /etc/syslog-ng.conf -p /var/run/syslog-ng.pid
-          ;;
-        stop)
-          killall -q /sbin/syslog-ng
-          rm -f /var/run/syslog-ng.pid
-          ;;
-        restart)
-          $0 stop
-          sleep 2
-          $0 start
-          ;;
-        *)
-          echo "usage: $0 [start|stop|restart]"
-          ;;
-        esac
+        $ sudo sh /etc/rc.d/syslog-ng start
+        $ sudo sh /etc/rc.d/sysklogd stop
         
-

1.4. Syslog-ng configuration

- -

Example of /etc/syslog-ng.conf - that configures syslog-ng matching tools already installed in the system - and some that are part of tools.

-

Description off global options used;

@@ -249,15 +142,10 @@ latency.
-
-        $ sudo sh /etc/rc.d/syslog-ng start
-        $ sudo sh /etc/rc.d/sysklogd stop
-        
- Tools Index

This is part of the c9-doc Manual. -Copyright (C) 2016 +Copyright (C) 2018 c9 team. See the file Gnu Free Documentation License for copying conditions.

-- cgit 1.4.1-2-gfad0