Return to
Portfolio

18. Oracle Solaris

18.1. Installing

  1. 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 23. Available Solaris Files
      Platform Archive

      Solaris 10/11 x86 archive

      nxlog-4.6.4661_solaris_x86.pkg.gz

      Solaris 10/11 SPARC archive

      nxlog-4.6.4661_solaris_sparc.pkg.gz

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

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

    $ gunzip nxlog-4.6.4661_solaris_sparc.pkg.gz
  4. 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. The specified user and group will be created, used for the User and Group directives in nxlog.conf, and used 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
  5. Install the NXLog package.

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

      $ sudo pkgadd -d nxlog-4.6.4661.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-4.6.4661.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=
  6. 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.

  7. Verify the configuration file syntax.

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

    $ svcs nxlog
     online     12:40:37 svc:system/nxlog:default
  9. 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

18.2. Upgrading

To update an NXLog installation to the latest 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-4.6.4661.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

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).

18.3. Uninstalling

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

$ sudo pkgrm NXnxlog
Note
This procedure may not remove all files that were created in order to configure NXLog, or that were created as a result of NXLog’s logging operations. To find these files, consult the configuration files that were used with NXLog and check the installation directory (/opt/nxlog).