Results 1 to 12 of 12

Thread: HOWTO: install syslog-ng

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2007
    Location
    Austria
    Posts
    52

    HOWTO: install syslog-ng

    HOWTO: install syslog-ng on a WL700gE
    2007-08-23 tiwag

    preferences:
    install kfurge's modified firmware WL700gE_1.0.4.6_kc_02a
    http://home.comcast.net/~kfurge/wl700g.html

    installation:
    1. install syslog-ng from http://ipkg.nslu2-linux.org/feeds/op...table/Packages
    Code:
    	root$ ipkg update
    	root$ ipkg install syslog-ng
    this installs syslog-ng version 2.0.4-2 (at the time of writing)

    there will be an error message when running the postinstall script

    2. edit the postinstall-script
    so that the ipkg installation can be run and terminated successfully

    here is a copy of mine:

    Code:
    #!/bin/sh
    ###############################################################################
    # /opt/lib/ipkg/info/syslog-ng.postinst
    # 2007-08-23 tiwag
    # 
    # modified ipkg postinstall script for syslog-ng used on WL700g
    #
    
    echo
    echo "How to use syslog-ng on a WL700gE"
    echo "1. kill syslogd before you start syslog-ng."
    echo "   $ killall syslogd"
    echo "2. Edit the file /opt/etc/init.d/S01syslog-ng."
    echo "   add the path to the configuration file
    echo "   /opt/sbin/syslog-ng -f /opt/etc/syslog-ng/syslog-ng.conf
    echo "3. run /opt/etc/init.d/S01syslog-ng."
    echo
    echo "Log files will be created by default at /opt/var/log."
    echo

    3. finish the ipkg installation
    Code:
    	root$ ipkg install syslog-ng
    finishes installation without an error message


    4. edit the startup-script
    by default syslog-ng_2.0.4-2 expects its config-file
    in /opt/etc/syslog-ng.conf (bug?), but the ipkg installer
    installs it in /opt/etc/syslog-ng/syslog-ng.conf.
    run syslog-ng with proper path to the config-file

    example of my startup script:


    Code:
    #!/bin/sh
    ###############################################################################
    # /opt/etc/init.d/S01syslog-ng
    # 2007-08-23 tiwag
    # 
    # Startup script for syslog-ng used on WL700g
    #
    
    # Stop syslogd if running
    if [ -n "`pidof syslogd`" ]; then
        /bin/killall syslogd 2>/dev/null
        sleep 2
    fi
    
    
    # Stop itself if running
    if [ -n "`pidof syslog-ng`" ]; then
        /bin/killall syslog-ng 2>/dev/null
        sleep 2
    fi
    
    # start syslog-ng with path to syslog-ng.conf file
    /opt/sbin/syslog-ng -f /opt/etc/syslog-ng/syslog-ng.conf
    sleep 2


    5. run the startup-script and test syslog-ng,

    the syslog can be viewed e.g. with
    Code:
    	root$ cat /opt/var/log/syslog
    if everything works as you expected, add the startup script
    for syslog-ng to your rc.local file and reboot your brick


    HTH, brgds,

    --
    tiwag



    ps.
    now i'm going to install fail2ban ... wish me luck !
    Last edited by tiwag; 23-08-2007 at 10:50.

Similar Threads

  1. HOWTO install debian on 128 mb usb stick
    By iiivx in forum WL-500gP Tutorials
    Replies: 49
    Last Post: 11-09-2010, 07:26
  2. Русские имена торрентов
    By Mirage-net in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 110
    Last Post: 18-06-2010, 14:16
  3. И снова про мультикаст...
    By Sabur in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 477
    Last Post: 17-05-2010, 05:57
  4. HowTo install a lightweight blog server
    By Tamadite in forum WL-500g/WL-500gx Tutorials
    Replies: 0
    Last Post: 03-12-2006, 01:46
  5. HowTo install OpenVPN server with multiple clients
    By JR-__- in forum WL-500g/WL-500gx Tutorials
    Replies: 0
    Last Post: 08-06-2006, 16:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •