Red Hat Enterprise Linux

This page describes the steps for installing and upgrading NXLog Agent on Red Hat Enterprise Linux (RHEL) and its derivatives.

In the past, we advertised support for CentOS due to its close relationship with Red Hat Enterprise Linux. However, our packages are only tested on RHEL systems. We cannot guarantee that RHEL packages will work on any other systems.

Distributions that are binary compatible with RHEL (Alma Linux, Rocky Linux, older CentOS Linux versions) will be able to use our packages, but they are not officially supported by NXLog Agent.

Installing NXLog Agent

First, download the appropriate NXLog Agent 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 Agent files tab, download the correct file for the target platform.

    Table 1. Available RHEL NXLog Agent files
    Platform Archive

    RHEL 6

    nxlog-6.3.9431_rhel6_x86_64.tar.bz2

    RHEL 7

    nxlog-6.3.9431_rhel7_x86_64.tar.bz2

    RHEL 8

    nxlog-6.3.9431_rhel8_x86_64.tar.bz2

    RHEL 9

    nxlog-6.3.9431_rhel9_x86_64.tar.bz2

    Generic RPM

    nxlog-6.3.9431_generic_rpm_x86_64.rpm

    The RHEL 6, RHEL 7, RHEL 8, and RHEL 9 archives above each contain several RPMs (see NXLog Agent packages in a RHEL archive below). These RPMs have dependencies on system-provided RPMs.

    The generic RPM above contains all the libraries (such as libpcre and libexpat) that are needed by NXLog Agent. The only dependency is libc. However, some modules are not available. For example, im_checkpoint. The advantage of the generic RPM is that it can be installed on most RPM-based Linux distributions.

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

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

    # tar -xf nxlog-6.3.9431_rhel7.x86_64.tar.bz2
    Table 2. NXLog Agent packages in a RHEL archive
    Package Description

    nxlog-6.3.9431_rhel7.x86_64.rpm

    The main NXLog Agent package

    nxlog-checkpoint-6.3.9431_rhel7.x86_64.rpm

    Provides the im_checkpoint module

    nxlog-dbi-6.3.9431_rhel7.x86_64.rpm (available for RHEL 6 and RHEL 7 only)

    Provides the im_dbi and om_dbi modules

    nxlog-java-6.3.9431_rhel7.x86_64.rpm

    Provides the xm_java, im_java, and om_java modules

    nxlog-kafka-6.3.9431_rhel7.x86_64.rpm

    Provides the im_kafka and om_kafka modules

    nxlog-odbc-6.3.9431_rhel7.x86_64.rpm

    Provides the im_odbc and om_odbc modules

    nxlog-pcap-6.3.9431_rhel7.x86_64.rpm

    Provides the im_pcap module

    nxlog-perl-6.3.9431_rhel7.x86_64.rpm

    Provides the xm_perl, im_perl, and om_perl modules

    nxlog-python-6.3.9431_rhel7.x86_64.rpm

    Provides the xm_python, im_python, and om_python modules

    nxlog-ruby-6.3.9431_rhel7.x86_64.rpm

    Provides the xm_ruby, im_ruby, and om_ruby modules

    nxlog-systemd-6.3.9431_rhel7.x86_64.rpm

    Provides the im_systemd module

    nxlog-wseventing-6.3.9431_rhel7.x86_64.rpm

    Provides the im_wseventing module

    nxlog-zmq-6.3.9431_rhel7.x86_64.rpm

    Provides the im_zmq and om_zmq modules

  5. Optional: To change the NXLog Agent user and group for the installation, set the NXLOG_USER and NXLOG_GROUP environment variables. During installation, a new user and group will be created from these environment variables. They will be used for the User and Group directives in nxlog.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.

    # export NXLOG_USER=nxlog2
    # export NXLOG_GROUP=nxlog2
  6. Download the public key file from the NXLog’s public contrib repository and import it to the RPM database.

    # rpm --import nxlog-pubkey.asc
    See Verify the signature of the RPM package for further details.
  7. If you are installing the nxlog-zmq package, enable the EPEL repository so ZeroMQ dependencies will be available:

    # yum install -y epel-release
  8. Use yum to install the required NXLog Agent packages (or the generic package) and dependencies.

    # yum install nxlog-6.3.9431_rhel7.x86_64.rpm
  9. 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.

  10. Verify the configuration file syntax.

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

    # service nxlog start
  12. Check that the NXLog Agent service is running.

    # service nxlog status
    nxlog (pid  9218) is running...

Upgrading NXLog Agent

To upgrade an NXLog Agent installation to the latest release, use yum as described in the installation instructions above. We recommend making a backup of the configuration files before starting this process.

# yum install nxlog-6.3.9431_rhel7.x86_64.rpm
The same user and group will be used for the upgrade as was used for the original installation. See installation user and group above. Changing to a different user and group during an upgrade is not supported.

Uninstalling NXLog Agent

To uninstall NXLog Agent, use yum remove. To remove any packages that were dependencies of NXLog Agent but are not required by any other packages, use the --setopt=clean_requirements_on_remove=1 option. Verify the operation before going ahead!

# yum remove 'nxlog-*'
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).