NXLog Legacy Documentation

Oracle Solaris

This topic describes the steps to install and upgrade NXLog on Oracle Solaris.

Installing

First, download the appropriate NXLog install archive from the NXLog website.

  1. Log in to your account, then click My account at the top of the page.

  2. Under the Downloads > My downloads tab, choose the correct archive for your system.

    Table 1. Available Solaris Files
    Platform Archive

    Solaris 10/11 x86 archive

    nxlog-6.4.9638_solaris_x86.pkg.gz

    Solaris 10/11 SPARC archive

    nxlog-6.4.9638_solaris_sparc.pkg.gz

  3. Use SFTP or a similar secure method to transfer the archive to the target server.

  4. Log in to the target server and extract the contents of the archive.

    $ gunzip nxlog-6.4.9638_solaris_sparc.pkg.gz
  5. Optional: To change the NXLog user and group for the installation, create a /var/sadm/install/admin/nxlog-user_group file with the following command. During installation a new user and and a new group will be created based on the names specified. They will be used for User and Group directives in nxlog.conf, and for the ownership of some directories under /opt/nxlog. Specifying an already existing user or group is not supported. The created user and group will be deleted on NXLog removal.

    $ echo 'nxlog2:nxlog2' > /var/sadm/install/admin/nxlog-user_group
  6. Install the NXLog package.

    • For interactive installation, issue the following command and answer y (yes) to the questions.

      $ sudo pkgadd -d nxlog-6.4.9638.pkg NXnxlog
    • For a quiet install, use an administration file. Place the file (nxlog-adm in this example) in the /var/sadm/install/admin/ directory.

      $ sudo pkgadd -n -a nxlog-adm -d nxlog-6.4.9638.pkg NXnxlog
      nxlog-adm
      mail=
      instance=overwrite
      partial=nocheck
      runlevel=nocheck
      idepend=nocheck
      rdepend=nocheck
      space=quit
      setuid=nocheck
      conflict=nocheck
      install
      action=nocheck
      basedir=/opt/nxlog
      networktimeout=60
      networkretries=3
      authentication=quit
      keystore=/var/sadm/security
      proxy=
  7. Configure NXLog by editing /opt/nxlog/etc/nxlog.conf. General information about configuring NXLog can be found in Configuration. For more details about configuring NXLog to collect logs on Solaris, see the Oracle Solaris summary.

  8. Verify the configuration file syntax.

    $ sudo /opt/nxlog/bin/nxlog -v
    2017-03-17 08:05:06 INFO configuration OK
  9. Check that the NXLog service is running with the svcs command.

    $ svcs nxlog
     online     12:40:37 svc:system/nxlog:default
  10. Manage the NXLog service with svcadm (restart the service to load the edited configuration file).

    $ sudo svcadm restart nxlog
    $ sudo svcadm enable nxlog
    $ sudo svcadm disable nxlog
To replace a trial installation of NXLog Enterprise Edition with a licensed copy of the same version, follow the same installation instructions (use instance=overwrite as shown).

Upgrading

Updating to a Minor Release

To update an NXLog installation to the latest minor release, remove the old version and then install the new version.

  1. Before removing the old version, run the backup script from /opt/nxlog/bin/backup. The backup script will create a backup directory in /opt (the directory will be named according to this format: /opt/nxlog-backup-YYYYMMDD_hhmmss).

    $ sudo bash /opt/nxlog/bin/backup
  2. To uninstall NXLog, use pkgrm as shown in the uninstallation instructions below.

    $ sudo pkgrm NXnxlog
  3. To install the new NXLog release, use pkgadd as in the installation instructions above.

    $ sudo pkgadd -d nxlog-6.4.9638.pkg NXnxlog
  4. After reinstalling NXLog, use the restore script from the latest backup directory to restore data to the new NXLog installation.

    $ sudo bash /opt/nxlog-backup-20180101_000001/restore
  5. Optional: To discard the backup files, remove the backup directory.

    $ sudo rm -rf /opt/nxlog-backup-20180101_000001

Upgrading 4.x to 5.x

To upgrade an NXLog 4.x installation to a 5.x release, remove the old version, install the new version, and perform additional manual configuration steps.

  1. Perform steps 1-3 from Updating to a Minor Release. Do not use restore (step 4).

  2. Manually migrate the necessary parts of the backup content to the new installation.

    From NXLog version 5.0, the configuration file log4ensics.conf changed to managed.conf and it is in a different location. This file contains NXLog Manager related configuration.

    nxlog.conf shipped with v5.0 has NXLog Manager integration disabled by default.
    Table 2. Configuration to migrate
    v 4.x v 5.0

    /opt/nxlog-backup-date_time/lib/nxlog/log4ensics.conf

    /opt/nxlog/etc/nxlog.d/managed.conf

    /opt/nxlog-backup-date_time/nxlog/cert/*

    /opt/nxlog/var/lib/nxlog/cert/

  3. Optional: To discard the backup files, remove the backup directory.

    $ sudo rm -rf /opt/nxlog-backup-20180101_000001

Uninstalling

To uninstall NXLog, use pkgrm. To remove the package files from the client’s file system, include the -A option.

$ sudo pkgrm NXnxlog
This procedure may not remove all files that were created while configuring NXLog. Likewise, any files created as a result of NXLog’s logging operations will not be removed. To find these files, examine the configuration files that were used with NXLog and check the installation directory (/opt/nxlog).