Return to
Portfolio

9. Debian & Ubuntu

9.1. Installing

  1. Download the appropriate NXLog installation file from the NXLog website.

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

    2. Under the Downloads  NXLog Enterprise Edition files tab, download the correct file for the target platform.

      Table 15. Available Debian/Ubuntu Archives
      Platform Archive

      Debian 8 (Jessie)

      nxlog-4.6.4661_debian8_amd64.tar.bz2

      Debian 9 (Stretch)

      nxlog-4.6.4661_debian9_amd64.tar.bz2

      Ubuntu 14.04 (Trusty Tahr)

      nxlog-4.6.4661_ubuntu14_amd64.tar.bz2

      Ubuntu 16.04 (Xenial Xerus)

      nxlog-4.6.4661_ubuntu16_amd64.tar.bz2

      Ubuntu 18.04 (Bionic Beaver)

      nxlog-4.6.4661_ubuntu18_amd64.tar.bz2

      Generic DEB

      nxlog-4.6.4661_generic_deb_amd64.deb

  2. Transfer the file to the target server using SFTP or a similar secure method.

  3. Log in to the target server and extract the contents of the archive (unless you are using the generic package):

    # tar -xjf nxlog-4.6.4661_debian9_amd64.tar.bz2
    Table 16. Packages in a Debian/Ubuntu Archive
    Package Description

    nxlog-4.6.4661_amd64.deb

    The main NXLog package

    nxlog-checkpoint-4.6.4661_amd64.deb

    Provides the im_checkpoint module

    nxlog-dbi-4.6.4661_amd64.deb

    Provides the im_dbi and om_dbi modules

    nxlog-odbc-4.6.4661_amd64.deb

    Provides the im_odbc and om_odbc modules

    nxlog-perl-4.6.4661_amd64.deb

    Provides the xm_perl, im_perl, and om_perl modules

    nxlog-wmi-4.6.4661_amd64.deb

    Provides the im_wmi module

    nxlog-wseventing-4.6.4661_amd64.deb

    Provides the im_wseventing module

    nxlog-zmq-4.6.4661_amd64.deb

    Provides the im_zmq and om_zmq modules

  4. Install the NXLog package(s) and their dependencies.

    1. Optional: To change the NXLog user and group for the installation, set the NXLOG_USER and NXLOG_GROUP environment variables. 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.

      # export NXLOG_USER=nxlog2
      # export NXLOG_GROUP=nxlog2
    2. Use dpkg to install the required NXLog packages (or the generic package, if you are using that).

      # dpkg -i nxlog-4.6.4661_amd64.deb
    3. If dpkg returned errors about uninstalled dependencies, use apt-get to install them and complete the NXLog installation.

      # apt-get -f install
  5. 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 Linux, see the GNU/Linux summary.

  6. Verify the configuration file syntax.

    # /opt/nxlog/bin/nxlog -v
    2017-03-17 08:05:06 INFO configuration OK
  7. Start the service using the service command:

    # service nxlog start
  8. Check that the NXLog service is running with the service command.

    # service nxlog status
    ● nxlog.service - LSB: logging daemon
       Loaded: loaded (/etc/init.d/nxlog)
       Active: active (running) since Wed 2016-10-19 22:21:36 BST; 3h 49min ago
      Process: 518 ExecStart=/etc/init.d/nxlog start (code=exited, status=0/SUCCESS)
       CGroup: /system.slice/nxlog.service
               └─6297 /opt/nxlog/bin/nxlog
    [...]

9.2. Upgrading

To upgrade an NXLog installation to the latest release, or to replace a trial installation of NXLog Enterprise Edition with a licensed copy, use dpkg as in the installation instructions above.

# dpkg -i nxlog-4.6.4661_amd64.deb
Note

When upgrading to a licensed copy with additional NXLog trial packages installed, such as nxlog-trial-python, use dpkg -i --auto-configure.

# dpkg -i --auto-configure nxlog-4.6.4661_amd64.deb \
  nxlog-python_4.6.4661_amd64.deb

Make sure to adjust the above command for all nxlog-trial packages that are actually installed.

If dpkg returns errors about uninstalled dependencies, resolve with apt-get.

# apt-get -f install
Note
The same user and group will be used for the upgrade as was used for the original installation (see installation step 4a above). Changing to a different user and group during upgrade is not supported.

9.3. Uninstalling

To uninstall NXLog, use apt-get. To remove any unused dependencies (system-wide), include the --auto-remove option. Verify the operation before confirming!

# apt-get remove '^nxlog*'
Note
Use apt-get purge instead to also remove configuration files. But in either case, 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).