Difference between revisions of "UPS setup"
Line 1: | Line 1: | ||
+ | {{NeedsUpdate}} | ||
+ | |||
+ | |||
== Powering Amahi (Fedora 12/14) with APC Back-UPS and [http://www.networkupstools.org/index.html Network UPS Tools (NUT)] == | == Powering Amahi (Fedora 12/14) with APC Back-UPS and [http://www.networkupstools.org/index.html Network UPS Tools (NUT)] == | ||
Revision as of 16:24, 5 April 2014
Update Needed | |
---|---|
The contents of this page have become outdated or irrelevant. Please consider updating it. |
Powering Amahi (Fedora 12/14) with APC Back-UPS and Network UPS Tools (NUT)
The software APC Back-UPS comes with does not work in Linux. Instead, you need to use NUT or apcupsd. Google will turn up evidence that both work, but NUT seems to be the preferred one.
The original instructions that this guidance is based on came from here and here. The former, by Peter Selinger, are closest to this case, but a lot of the work he had to do is now done for you out of the box. The latter are for a different UPS, but are also fresher.
NOTE: This will be a future Amahi Web Application. To use the web monitoring capability, see UPS Monitor.
First, do this as root user:
bash code |
---|
yum -y install nut nut-client
|
Next, you will need to configure four files in /etc/ups: ups.conf, upsd.users, hosts.conf, and upsmon.conf. They will look almost identical to Selinger's (password1 and password2 can be changed to anything):
bash code |
---|
vi /etc/ups/ups.conf
|
Text |
---|
[apc] driver = usbhid-ups port = auto desc = "APC Back-UPS"
|
bash code |
---|
vi /etc/ups/upsd.users
|
Text |
---|
[admin] password = password1 actions = SET instcmds = ALL [monuser] password = password2 upsmon master
|
bash code |
---|
vi /etc/ups/hosts.conf
|
Text |
---|
MONITOR apc@localhost "UPS on HDA"
|
bash code |
---|
vi /etc/ups/upsmon.conf
|
Text |
---|
MONITOR apc@localhost 1 monuser password2 master MINSUPPLIES 1 SHUTDOWNCMD "/sbin/shutdown -h +0" POLLFREQ 5 POLLFREQALERT 5 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG /etc/killpower RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 5
|
The next step is to start the UPS service:
bash code |
---|
upsdrvctl start service ups stop service ups start
|
At this point, you should see something like this in your terminal:
Starting UPS driver controller: [ OK ] Starting upsd: [ OK ] Starting UPS monitor (master): [ OK ]
If you do not, it may be because upsdrvctl refuses to cooperate at first. A reboot will fix that problem. The final step is to make sure that the UPS services start when the server does. For that, the /etc/rc.local file must be edited as follows:
bash code |
---|
vi /etc/rc.local
|
Text |
---|
echo "Starting UPS driver, daemon, and monitor." /sbin/upsdrvctl start /usr/sbin/upsd /usr/sbin/upsmon
|