NXLog comes in precompiled packages for OpenBSD. To install NXLog take the following actions.
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 thetab, choose the correct package for your system.
Table 19. Available OpenBSD Packages Platform Package
Use SFTP or a similar secure method to transfer the archive to the target server.
Log in to the target server as the root user.
Optional: To change the NXLog user and group for the installation, set the
NXLOG_GROUPenvironment 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
Install NXLog with the
pkg_add(1)utility. The OpenBSD package is currently unsigned, use the
-D unsignedflag to install.
# pkg_add -D unsigned nxlog-4.6.4661-obsd6_2_x86_64.tgz nxlog-4.6.4661-obsd6_2: ok The following new rcscripts were installed: /etc/rc.d/nxlog See rcctl(8) for details.
The installation prefix is
/opt/nxlog. Configuration files are located in
rcinit script is placed in
Edit the configuration file.
# vi /opt/nxlog/etc/nxlog.conf
Verify the configuration file syntax.
# /opt/nxlog/bin/nxlog -v 2017-03-17 08:05:06 INFO configuration OK
Manage the service using the
# rcctl enable nxlog # rcctl start nxlog nxlog(ok) # rcctl stop nxlog nxlog(ok) # rcctl disable nxlog
You can also use
rcctl(8)to check and set the configuration flags.
# rcctl set nxlog flags -c /tmp/sample-nxlog.conf # rcctl get nxlog nxlog_class=daemon nxlog_flags=-c /tmp/sample-nxlog.conf nxlog_rtable=0 nxlog_timeout=30 nxlog_user=root # rcctl reload nxlog
Check the NXLog service status using
# rcctl check nxlog nxlog(ok)
To upgrade from a previous NXLog version (whether a licensed
copy or trial), use the
utility. This example shows an upgrade from version
# pkg_add -U nxlog-4.6.4661-obsd6_2_x86_64.tgz nxlog-3.0.1865-obsd6_2->4.6.4661-obsd6_2: ok Read shared items: ok
To replace a trial installation of NXLog Enterprise Edition with a licensed
copy of the same version, use
pkg_add with the replace flag (
# pkg_add -r nxlog-4.6.4661-obsd6_2_x86_64.tgz
|The same user and group will be used for the upgrade as was used for the original installation (see installation step 4 above). Changing to a different user and group during upgrade is not supported.|
To uninstall NXLog, follow these steps.
pkg_delete(1)utility to remove the
# pkg_delete nxlog nxlog-4.6.4661-obsd6_2: ok Read shared items: ok --- -nxlog-4.6.4661-obsd6_2 -------------------
The uninstall script will remove NXLog along with the user, group, and files. The
pkg_deleteutility will not remove new files or modified configuration files.
Manually remove the base directory. This will remove any new or modified files left behind by the previous step.
# rm -rf /opt/nxlog