Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Installing Syslog-ng on Solaris 9

Those notes were created based on my experience in integration of syslg-ng in the Tivoli environment. Although I tried to clean them to make the how-to more universally applicable, some details might still be relevant only to this particular purpose.

  1. Download two required packages from Sunfreeware

    libol 0.3.13

    syslog-ng1.6.4 or later

  2. Unzip and install libol package

    cd ~/syslog-ng

    gunzip libol-0.3.13-sol9-sparc-local.gz
    pkgadd -d 
    libol-0.3.13-sol9-sparc-local.gz
    | tee ~/syslog-ng/libol.log
     

  3. Unzip and install syslog-ng package

    gunzip syslogng-1.6.4-sol9-sparc-local.gz
    pkgadd -d 
    syslogng-1.6.4-sol9-sparc-local | tee ~/syslog-ng/syslog-ng.log

     

  4. Create the directory /etc/syslog-ng

    cd /etc

    mkdir /etc/syslog-ng

    chmod 755 /etc/syslog-ng

    chown root:sys /etc/syslog-ng

     

  5. Copy configuration file into /etc/syslog-ng and link it to /etc/syslog.conf

    cp /usr/local/doc/syslog-ng/doc/syslog-ng.conf.solaris /etc/syslog-ng/syslog-ng.conf # Use attached script

    chmod 644 /etc/syslog-ng/syslog-ng.conf && chown root:sys /etc/syslog-ng/syslog-ng.conf

    mv /etc/syslog.conf /etc/syslog.cong.orig

    ln -s /etc/syslog-ng/syslog-ng.conf /etc/syslog.conf
     

  6. Copy startup script into /etc/init.d. That changes all links to /etc/init.d/syslog in rc0.d ... rc3.d and rcS.d (in rc.0, rc.1 it's kill actions K40syslog,  in rc.2 it's start action S74syslog )

    cp /etc/init.d/syslog /etc/init.d/syslog.orig

    cp /usr/local/doc/syslog-ng/contrib/init.d.solaris /etc/init.d/syslog # get solaris startup script

    chmod 744 /etc/init.d/syslog && chown root:sys /etc/init.d/syslog

  7. Check the correctness of the configuration

    /usr/local/sbin/syslog-ng -v -s -f /etc/syslog-ng/syslog-ng.conf
     

  8. Shut down the orig syslogd .

        /etc/init.d/syslog.orig stop
     

  9. Remove executable bits from the original syslogd.

        chmod 644 /usr/sbin/syslogd
     

  10. Edit /etc/logadm.conf:

    cp /etc/logadm.conf /etc/sysadm.conf.orig

    vi /etc/sysadm.conf.org

    then replace all

        'kill -HUP `cat /var/run/syslog.pid`'

    to

        'kill -HUP `cat /etc/syslog-ng/syslog-ng.pid`'

    using for example vi (or ed) command  :

        g/\/var\/run\/syslog\.pid/s/\/var\/run\/syslog\.pid/\/etc\/syslog\-ng\/syslog\-ng\.pid/g
     

  11. Start syslogd-ng

    /etc/init.d/syslog start 
     
     

  12. Check is it created /etc/syslog-ng/syslog-ng.pid
     
  13. Send test message using logger 

    logger -p daemon.crit syslog-ng test

    Check tail of /var/adm/messages. It should have  a line like:

    Feb 17 18:37:55 tivoliada daemon: [ID 702911 daemon.crit]

Supplement 1:  Modified /etc/init.d/syslog

Supplement 2:  Modified /etc/syslog-ng/syslog-ng.conf


Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: February 28, 2008