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.
- 
Log in to your account, then click My account at the top of the page. 
- 
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.9.10227_solaris_x86.pkg.gz Solaris 10/11 SPARC archive nxlog-6.9.10227_solaris_sparc.pkg.gz 
- 
Use SFTP or a similar secure method to transfer the archive to the target server. 
- 
Log in to the target server and extract the contents of the archive. $ gunzip nxlog-6.9.10227_solaris_sparc.pkg.gz
- 
Optional: To change the NXLog user and group for the installation, create a /var/sadm/install/admin/nxlog-user_groupfile 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 innxlog.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
- 
Install the NXLog package. - 
For interactive installation, issue the following command and answer y (yes) to the questions. $ sudo pkgadd -d nxlog-6.9.10227.pkg NXnxlog
- 
For a quiet install, use an administration file. Place the file ( nxlog-admin this example) in the/var/sadm/install/admin/directory.$ sudo pkgadd -n -a nxlog-adm -d nxlog-6.9.10227.pkg NXnxlognxlog-admmail= 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= 
 
- 
- 
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.
- 
Verify the configuration file syntax. $ sudo /opt/nxlog/bin/nxlog -v 2017-03-17 08:05:06 INFO configuration OK
- 
Check that the NXLog service is running with the svcscommand.$ svcs nxlog online 12:40:37 svc:system/nxlog:default
- 
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=overwriteas 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.
- 
Before removing the old version, run the backupscript 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
- 
To uninstall NXLog, use pkgrmas shown in the uninstallation instructions below.$ sudo pkgrm NXnxlog
- 
To install the new NXLog release, use pkgaddas in the installation instructions above.$ sudo pkgadd -d nxlog-6.9.10227.pkg NXnxlog
- 
After reinstalling NXLog, use the restorescript from the latest backup directory to restore data to the new NXLog installation.$ sudo bash /opt/nxlog-backup-20180101_000001/restore
- 
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.
- 
Perform steps 1-3 from Updating to a Minor Release. Do not use restore(step 4).
- 
Manually migrate the necessary parts of the backup content to the new installation. From NXLog version 5.0, the configuration file log4ensics.confchanged tomanaged.confand it is in a different location. This file contains NXLog Manager related configuration.nxlog.confshipped 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/
- 
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). | 
