There are quite a few documents
on the nut website, including a comprehensive readme
. Because the setup is not trivial, it is worth understanding how the system works before attempting this.
Here is one setup example (for a PowerWare 3105 connected to a Debian box). With the newer version of nut, much of this is automated.
1. Install the nut package.
apt-get install nut
2. Edit the file /etc/nut/ups.conf and put in a section for your UPS (note that your driver setup is likely to be different to this):
driver = bcmxcp_usb
port = auto
3. Start the UPS driver:
4. Edit the file /etc/nut/upsd.conf and specify which machines will be able to access the ups information server (in this example, only the localhost):
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32
5. Edit the file /etc/nut/upsd.users and specify that this is the master machine, and the password:
password = abc123
allowfrom = localhost
6. Edit the file /etc/nut/upsmon.conf, and specify the power actions:
MONITOR pw3105@localhost 1 nut abc123 master
SHUTDOWNCMD "/sbin/shutdown -h +0"
7. Make sure the permissions are set for the nut files (particular those with passwords):
chown nut:nut /etc/nut/*
chmod 640 /etc/nut/upsd.users /etc/nut/upsmon.conf
8. Start the UPS information server and monitor
9. Check the UPS status:
upsc pw3105@localhost ups.status
10. Edit the file /etc/default/nut and make sure that the UPS information server and monitor will be started by default on power up:
11. There are many client applications
to monitor the UPS status via nut. For example, there is the windowmaker panel 'wmnut' (probably not appropriate for an Ubuntu install):
apt-get install wmnut