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> 17 / 84<br />

Ownership and permissions<br />

Set ownership data and permissions on your serial or USB ports that go to your <strong>UPS</strong> hardware. Be sure to limit access to just the<br />

user you created earlier.<br />

These examples assume the second serial port (ttyS1) on a typical Slackware system. On FreeBSD, that would be cuaa1. Serial<br />

ports vary greatly, so yours may be called something else.<br />

chmod 0660 /dev/ttyS1<br />

chown root:nut /dev/ttyS1<br />

The setup for USB ports is slightly more complicated. Device files for USB devices, such as /proc/bus/usb/002/001, are usually<br />

created "on the fly" when a device is plugged in, and disappear when the device is disconnected. Moreover, the names of these<br />

device files can change randomly. To set up the correct permissions for the USB device, you may need to set up (operating system<br />

dependent) hotplugging scripts. Sample scripts and information are provided in the scripts/hotplug and scripts/udev directories.<br />

For most users, the hotplugging scripts will be installed automatically by "make install".<br />

(If you want to try if a driver works without setting up hotplugging, you can add the "-u root" option to upsd, upsmon, and drivers;<br />

this should allow you to follow the below instructions. However, don’t forget to set up the correct permissions later!).<br />

Note<br />

if you are using something like udev or devd, make sure these permissions stay set across a reboot. If they revert to the old<br />

values, your drivers may fail to start.<br />

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

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

5.2 Installing from packages<br />

This chapter describes the specific installation steps when using binary packages that exist on various major systems.<br />

5.2.1 Debian, Ubuntu and other derivatives<br />

Note<br />

NUT is packaged and well maintained in these systems. The official Debian packager is part of the NUT Team.<br />

Using your prefered method (apt-get, aptitude, Synaptic, . . . ), install the nut package, and optionaly the following:<br />

• nut-cgi, if you need the CGI (HTML) option,<br />

• nut-snmp, if you need the snmp-ups driver,<br />

• nut-xml, for the netxml-ups driver,<br />

• nut-powerman-pdu, to control the PowerMan daemon (PDU management)<br />

• nut-dev, if you need the development files.<br />

Configuration files are located in /etc/nut. nut.conf(5) must be edited to be able to invoke /etc/init.d/nut<br />

Note<br />

Ubuntu users can access the APT URL installation by clicking on this link.

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

Saved successfully!

Ooh no, something went wrong!