02.12.2015 Views

Network UPS Tools User Manual

Network UPS Tools User Manual

Network UPS Tools User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

• to build and install SNMP drivers, add --with-snmp (note that you need to install libsnmp development package or files).<br />

• to build and install CGI scripts, add --with-cgi.<br />

See Configure options from the <strong>User</strong> <strong>Manual</strong>, docs/configure.txt or ./configure --help for all the available options.<br />

If you alter paths with additional switches, be sure to use those new paths while reading the rest of the steps.<br />

Reference: Configure options from the <strong>User</strong> <strong>Manual</strong>.<br />

Build the programs<br />

make<br />

This will build the NUT client and server programs and the selected drivers. It will also build any other features that were selected<br />

during configuration step above.<br />

Installation<br />

Note<br />

you should now gain privileges for installing software if necessary:<br />

su<br />

Install the files to a system level directory:<br />

make install<br />

This will install the compiled programs and man pages, as well as some data files required by NUT. Any optional features selected<br />

during configuration will also be installed.<br />

This will also install sample versions of the NUT configuration files. Sample files are installed with names like ups.conf.sample<br />

so they will not overwrite any existing real config files you may have created.<br />

If you are packaging this software, then you will probably want to use the DESTDIR variable to redirect the build into another<br />

place, i.e.:<br />

make DESTDIR=/tmp/package install<br />

make DESTDIR=/tmp/package install-conf<br />

State path creation<br />

Create the state path directory for the driver(s) and server to use for storing <strong>UPS</strong> status data and other auxiliary files, and make it<br />

group-writable by the group of the system user you created.<br />

mkdir -p /var/state/ups<br />

chmod 0770 /var/state/ups<br />

chown root:nut /var/state/ups

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

Saved successfully!

Ooh no, something went wrong!