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 |
|---|---|
Direct SQL access is currently available only for Sparc systems. |
![]() |
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
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.
The syslog-ng Premium Edition package
(syslog-ng-premium-edition_<version>)
from
The libdbi8 package from
http://www.balabit.com/downloads/files/syslog-ng/binaries/premium-edition/pool/l/libdbi8/
The libiconv and libgcc
packages required by the libdbi8 package. For
Solaris 9, download the
libiconv-1.11-sol9-sparc-local.gz and
libgcc-3.4.6-sol9-sparc-local.gz packages from
http://www.sunfreeware.com. For Solaris 8, download the
libiconv-1.11-sol8-sparc-local.gz and
libgcc-3.4.6-sol8-sparc-local.gz packages.
If you plan to use an SQL destination (excluding Oracle), download the package corresponding to your database from
http://www.balabit.com/downloads/files/syslog-ng/binaries/premium-edition/pool/l/libdbi8-drivers/
Also download the package corresponding to the database, architecture, and Solaris version you plan to use from http://www.sunfreeware.com. The Sunfreeware.com website includes details on installing the database, and any required dependencies.
For MySQL, download the
mysql-5.0.41-sol9-sparc-local and
openssl-0.9.8e-sol9-sparc-local
packages.
For PostgreSQl, the required packages are available on the Solaris 9 installation DVD.
For SQLite, download the
sqlite-3.3.6-sol9-sparc-local.gz
package.
![]() |
Note |
|---|---|
The database packages contain the full database applications, but
syslog-ng does not use the databases, only the
|
If you plan to use the Oracle destination, download the
libdbi8 package corresponding to your platform
from
http://www.balabit.com/downloads/files/syslog-ng/binaries/premium-edition/pool/l/libdbi8-drivers/
Download or copy the
syslog-ng_<version_number>_sparc.pkg.gz
package to your computer running Solaris.
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
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.
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
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.
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 |
|---|---|
|
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 |
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 |
|---|---|
The syslog-ng application currently supports only Oracle Instant Client Basic
Package 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 |
|---|---|
On Solaris 8 and 9, you have to edit the |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/oracle/instantclient_10_2 export LD_LIBRARY_PATH
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.
Stop the original syslog daemon.
# /etc/init.d/syslog.orig stop
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 |
|---|---|
|
There is no # 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 |
Start syslog-ng.
# /etc/init.d/syslog start
Verify that the /var/run/syslog-ng.pid file
exists.
Verify that syslog-ng is running.
# ps -Af | grep -v grep | grep syslog-ng
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