Changes

From Amahi Wiki
Jump to: navigation, search
115 bytes removed ,  03:46, 23 June 2020
First, do this as [http://wiki.amahi.org/index.php/Open_Terminal_as_root root user]:
{{Code|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):
{{Code|Code=
vi /etc/ups/ups.conf
}}
{{Text|Text= vi /etc/ups/ups.conf <pre>
[apc]
driver = usbhid-ups
port = auto
desc = "APC Back-UPS"
}}</pre>
{{Code|Code=
vi /etc/ups/upsd.users
}}
 {{Text|Text=<pre>
[admin]
password = password1
password = password2
upsmon master
}}</pre>
vi /etc/ups/hosts.conf
{{Code|Code=vi /etc/ups/hosts.conf}} {{Text|Text=<pre>
MONITOR apc@localhost "UPS on HDA"
}}</pre>
vi /etc/ups/upsmon.conf
{{Code|Code=vi /etc/ups/upsmon.conf}} {{Text|Text=<pre>
MONITOR apc@localhost 1 monuser password2 master
MINSUPPLIES 1
NOCOMMWARNTIME 300
FINALDELAY 5
}}</pre>
The next step is to start the UPS service:
{{Code|
upsdrvctl start
service ups stop
service ups start
}}
upsdrvctl start
service ups stop
service ups start
At this point, you should see something like this in your terminal:
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:
{{Code|Code=
vi /etc/rc.local
}}
{{Text|Text= vi /etc/rc.local <pre>
echo "Starting UPS driver, daemon, and monitor."
/sbin/upsdrvctl start
/usr/sbin/upsd
/usr/sbin/upsmon
}}</pre>
12,424

edits