4.5. Installing syslog-ng on Sun Solaris 8 and 9

To successfully install syslog-ng, complete the following simple procedure. Lines starting with # are commands that have to be executed from a command line console.

[Note] Note

Direct SQL access is currently available only for Sparc systems.

[Note] Note

Steps 4 and 7 are slightly different on Solaris 8 systems, see the notes at the respective steps for details.

Procedure 4.5. Installing syslog-ng on Sun Solaris 8 or 9

  1. Use the your username and password received together with your syslog-ng Premium Edition license to download the following binaries. Make sure to download the package specific for the processor architecture of the host.

  2. Download or copy the syslog-ng_<version_number>_sparc.pkg.gz package to your computer running Solaris.

  3. Unpack and install the syslog-ng Premium Edition, libdbi8, libiconv and the libgcc packages by issuing the following commands from the command line:

    # gunzip libiconv-1.11-sol9-sparc-local.gz
    # gunzip libgcc-3.4.6-sol9-sparc-local.gz
    # gunzip syslog-ng_<version_number>_sparc.pkg.gz
    # gunzip libdbi8_<version>_<arch>.gz
    # pkgadd -d libiconv-1.11-sol9-sparc-local.gz
    # pkgadd -d libgcc-3.4.6-sol9-sparc-local.gz
    # pkgadd -d syslog-ng_<version_number>_sparc.pkg
    # pkgadd -d libdbi8_<version>_<arch>.pkg
  4. If you use an SQL destination, issue the commands corresponding to the database:

    • For Oracle:

      # gunzip libdbd8-oracle_<version>_<arch>.gz
      # pkgadd -d libdbd8-oracle_<version>_<arch>.pkg
    • For MySQL:

      # gunzip libdbd8-mysql_<version>_<arch>.gz
      # pkgadd -d libdbd8-mysql_<version>_<arch>.pkg
    • For PostgreSQL:

      # gunzip libdbd8-pgsql_<version>_<arch>.gz
      # pkgadd -d libdbd8-pgsql_<version>_<arch>.pkg
    • For SQLite:

      # gunzip libdbd8-sqlite_<version>_<arch>.gz
      # pkgadd -d libdbd8-sqlite_<version>_<arch>.pkg

    For MySQL, PostgreSQL, and SQLite, install the corresponding database package and its dependencies downloaded from http://www.sunfreeware.com.

  5. Rename the syslog-ng.conf.sample file (located under /opt/syslog-ng/etc/) to syslog-ng.conf.

    # mv /opt/syslog-ng/etc/syslog-ng.conf.sample /opt/syslog-ng/etc/syslog-ng.conf
  6. Modify the syslog-ng.conf.to suit your needs. For details on how to configure syslog-ng, see The syslog-ng Administrator Guide, Chapter 3, Configuring syslog-ng.

  7. Copy the startup script into the /etc/init.d folder and set its privileges.

    # cp /etc/init.d/syslog /etc/init.d/syslog.orig
    # cp /opt/syslog-ng/doc/syslog-ng.init.d /etc/init.d/syslog
    # chmod 744 /etc/init.d/syslog && chown root:sys /etc/init.d/syslog
    [Note] Note

    Under Solaris 8, issue the following commands as well:

    # rm /etc/rc2.d/S74syslog
    # ln -s /etc/init.d/syslog /etc/rc2.d/S74syslog
    # rm /etc/rc0.d/K40syslog /etc/rc1.d/K40syslog /etc/rcS.d/K40syslog 
    # ln -s /etc/init.d/syslog /etc/rc0.d/K40syslog
    # ln -s /etc/init.d/syslog /etc/rc1.d/K40syslog
    # ln -s /etc/init.d/syslog /etc/rcS.d/K40syslog
  8. Optional step: If you use an Oracle database destination, complete the following steps:

    Download Oracle Instant Client Basic Package version 10.2.0.X for your platform from http://www.oracle.com/technology/software/tech/oci/instantclient/index.html and unzip the package into a single directory (e.g., /usr/local/oracle/instantclient_10_2). You need to register to access the package, but registration is free.

    [Note] Note

    The syslog-ng application currently supports only Oracle Instant Client Basic Package version 10.2.0.X. This does not mean that you have to use version 10 of the Oracle database, because the different versions of the Instant Client all support the same protocol. Multiple versions of the Oracle Instant Client can be run simultaneously if other applications running on your system require a different version.

    Edit the /etc/init.d/syslog-ng file and add the following lines before the case block. Replace /usr/local/oracle/instantclient_10_2 with the actual path of Oracle Instant Client version 10.2.0.3.

    [Note] Note

    On Solaris 8 and 9, you have to edit the /etc/init.d/syslog file.

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/oracle/instantclient_10_2
    export LD_LIBRARY_PATH
  9. Optional step: When installing syslog-ng to the central syslog-ng server, copy the license.txt license file to the /opt/syslog-ng/syslog-ng.conf directory of the server.

  10. Stop the original syslog daemon.

    # /etc/init.d/syslog.orig stop
  11. Modify the /etc/logadm.conf file and replace all kill -HUP `cat /var/run/syslog.pid` commands with kill -HUP `cat /var/run/syslog-ng.pid`. This can be accomplished for example using the vi text editor:

    # cp /etc/logadm.conf /etc/logadm.conf.orig
    # vi /etc/logadm.conf

    Type : and issue the following command from vi:

    g</var/run/syslog.pid<s</var/run/syslog.pid</var/run/syslog-ng.pid<g
    [Note] Note

    There is no logadm utility under Solaris 8, therefore newsyslog has to be modified. Modify the /usr/lib/newsyslog file and replace all kill -HUP `cat /etc/syslog.pid` commands with kill -HUP `cat /var/run/syslog-ng.pid`. This can be accomplished for example using the vi text editor:

    # cp /usr/lib/newsyslog /usr/lib/newsyslog.orig# vi /usr/lib/newsyslog

    Type ':' and issue the following command from vi:

    g</etc/syslog.pid<s</var/run/syslog.pid</var/run/syslog-ng.pid<g
  12. Start syslog-ng.

    # /etc/init.d/syslog start
  13. Verify that the /var/run/syslog-ng.pid file exists.

  14. Verify that syslog-ng is running.

    # ps -Af | grep -v grep | grep syslog-ng
  15. Send a test message and verify that it has successfully arrived into the /var/log/messages file.

    # logger -p daemon.crit syslog-ng test
    # tail /var/log/messages

© 2007 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com