Oracle Solaris
This page describes the steps for installing and upgrading NXLog Agent on Oracle Solaris.
Installing NXLog Agent
First, download the appropriate NXLog Agent installer file from the NXLog website.
-
Log in to your account, then click My account at the top of the page.
-
Under the Downloads > NXLog Agent files tab, choose the correct file for your system.
Table 1. Available NXLog Agent Solaris files Platform Archive Solaris 10/11 x86 archive
nxlog-6.4.9634_solaris_x86.pkg.gz
Solaris 10/11 SPARC archive
nxlog-6.4.9634_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.4.9634_solaris_sparc.pkg.gz
-
Optional: To change the NXLog Agent 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 group will be created from these environment variables. They will be used for the User and Group directives innxlog.conf
, and to set ownership of the/opt/nxlog
directory. Specifying an already existing user or group is not supported. The created user and group will be deleted when you uninstall NXLog Agent.$ echo 'nxlog2:nxlog2' > /var/sadm/install/admin/nxlog-user_group
-
Install NXLog Agent.
-
For interactive installation, execute the following command and answer y (yes) to the questions.
$ sudo pkgadd -d nxlog-6.4.9634.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.9634.pkg NXnxlog
nxlog-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 Agent by editing
/opt/nxlog/etc/nxlog.conf
.
See Log collection in the NXLog Platform User Guide for more information and configuration examples.
For more details about configuring NXLog Agent to collect logs on Solaris, see Oracle Solaris log sources. -
Verify the configuration file syntax.
$ sudo /opt/nxlog/bin/nxlog -v 2024-01-12 08:05:06 INFO configuration OK
-
Check that the NXLog Agent service is running with the
svcs
command.$ svcs nxlog online 12:40:37 svc:system/nxlog:default
-
Manage the NXLog Agent service with
svcadm
. You must restart the service to load the new configuration.$ sudo svcadm restart nxlog $ sudo svcadm enable nxlog $ sudo svcadm disable nxlog
To replace a trial installation of NXLog Agent with a licensed copy of the same version, follow the installation instructions above and use instance=overwrite .
|
Upgrading NXLog Agent
To update an NXLog Agent installation to the latest version, remove the old version and then install the new one.
-
Before removing the old version, run the
backup
script from/opt/nxlog/bin/backup
. The backup script creates a backup directory in/opt
using the format/opt/nxlog-backup-YYYYMMDD_hhmmss
.$ sudo bash /opt/nxlog/bin/backup
-
Uninstall NXLog Agent using
pkgrm
as described in the uninstallation instructions below.$ sudo pkgrm NXnxlog
-
Install the new NXLog Agent version using
pkgadd
as described in the installation instructions above.$ sudo pkgadd -d nxlog-6.4.9634.pkg NXnxlog
-
After reinstalling NXLog Agent, use the
restore
script from the latest backup directory to restore the data to the new NXLog Agent installation.$ sudo bash /opt/nxlog-backup-20180101_000001/restore
-
Optional: To discard the backup files, delete the backup directory.
$ sudo rm -rf /opt/nxlog-backup-20180101_000001
Uninstalling NXLog Agent
Use pkgrm
to uninstall NXLog Agent.
To remove the package files from the client’s file system, use the -A
option.
$ sudo pkgrm NXnxlog
This procedure may not remove all files that were created while configuring NXLog Agent.
Likewise, any files created as a result of NXLog Agent’s operations will not be removed.
To find these files, examine the NXLog Agent configuration files and check the NXLog Agent installation directory (/opt/nxlog ).
|