02.12.2015 Views

Network UPS Tools User Manual

Network UPS Tools User Manual

Network UPS Tools User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong> <strong>User</strong> <strong>Manual</strong> 19 / 84<br />

5.2.5 FreeBSD<br />

You can either install NUT as a binary package or as a port.<br />

Binary package<br />

To install the main component, use the following command:<br />

# pkg_add -r nut<br />

Port<br />

The port is located under /usr/ports/sysutils/nut. To install it, use the following command:<br />

# cd /usr/ports/sysutils/nut/ && make install clean<br />

You have to define WITH_NUT_CGI to build the optional CGI scripts.<br />

Optionaly, you can also install the following ports:<br />

• sysutils/nut-snmp, for the SNMP driver,<br />

• sysutils/nut-usb, for the USB drivers,<br />

• sysutils/nut-libupsclient, for the upsclient library.<br />

You are now ready to configure NUT, and start testing and using it.<br />

You can jump directly to the NUT configuration.<br />

6 Configuration notes<br />

This chapter describe most of the configuration and use aspects of NUT, including establishing communication with the device<br />

and configuring safe shutdowns when the <strong>UPS</strong> battery runs out of power.<br />

There are many programs and features in this package. You should check out the NUT Overview and other accompanying<br />

documentation to see how it all works.<br />

Note<br />

NUT does not currently provide proper graphical configuration tools. However, there is now support for Augeas, which will<br />

enable the easier creation of configuration tools. Moreover, nut-scanner(8) is available to discover supported devices (USB,<br />

SNMP, Eaton XML/HTTP and IPMI) and NUT servers (using Avahi or the classic connection method).<br />

6.1 Details about the configuration files<br />

6.1.1 Generalities<br />

All configuration files within this package are parsed with a common state machine, which means they all can use a number of<br />

extras described here.<br />

First, most of the programs use an uppercase word to declare a configuration directive. This may be something like MONITOR,<br />

NOTIFYCMD, or ACCESS. The case does matter here. "monitor" won’t be recognized.<br />

Next, the parser does not care about whitespace between words. If you like to indent things with tabs or spaces, feel free to do it<br />

here.<br />

If you need to set a value to something containing spaces, it has to be contained within "quotes" to keep the parser from splitting<br />

up the line. That is, you want to use something like this:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!