Difference between revisions of "Uninterruptable Power Supply:APC"

From SME Server
Jump to navigationJump to search
m (Reverted edits by Robwellesley (Talk) to last revision by Timn)
Line 1: Line 1:
 
==To set up apcupsd on SME 7.4==
 
==To set up apcupsd on SME 7.4==
  
----------------------------------------------------------------------------------------
+
===Setup the DAG repository===
  
First setup DAG repository
+
{{Repository|Dag}}
  
http://wiki.contribs.org/Dag
+
===Installation===
 
+
Install ''apcupsd''
INSTALL APCUPSD
 
 
  yum install --enablerepo=dag --enablerepo=base apcupsd
 
  yum install --enablerepo=dag --enablerepo=base apcupsd
  
COPY ORIGINAL CONF
+
Copy original ''conf'' file
  cp /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.conf.orig
+
  cp apcupsd.conf apcupsd.conf.orig
  
COPY CGI FILES
+
Copy ''CGI'' files
 
  cp /var/www/apcupsd/* /home/e-smith/files/ibays/Primary/cgi-bin/
 
  cp /var/www/apcupsd/* /home/e-smith/files/ibays/Primary/cgi-bin/
  
LINK STARTUP SCRIPT
+
Link the startup script
 
  ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S99apcupsd
 
  ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S99apcupsd
  
SET SERVICE IN SME
+
Set the Service in SME
 
  config set apcupsd service status enabled
 
  config set apcupsd service status enabled
  
-------------------------------------------------------------------------
+
===Configuration===
 
 
 
Edit /etc/apcupsd/apcupsd.conf. The conf file has good detail on setup options.
 
Edit /etc/apcupsd/apcupsd.conf. The conf file has good detail on setup options.
  
Line 29: Line 27:
 
Set TIMEOUT to 10 for testing.
 
Set TIMEOUT to 10 for testing.
  
Reboot or /etc/init.d/apcupsd start to start the service.
+
Reboot or  
 +
/etc/init.d/apcupsd start  
 +
to start the service.
  
http://host.domain/cgi-bin/multimon.cgi  gives a nice look at the UPS status, including a log of past events
+
===Usage===
 +
http://yourdomain.tld/cgi-bin/multimon.cgi  gives a nice look at the UPS status, including a log of past events
  
 +
----
 
[[Category:Howto]]
 
[[Category:Howto]]
 +
[[Category:Administration]]

Revision as of 10:32, 2 June 2010

To set up apcupsd on SME 7.4

Setup the DAG repository

The following command will configure the Dag repository on SME Server. EDIT NOT COMPLETE!


To create an entry in the database for the epel repository we open put the following commands in a terminal window or in a shell window:

/sbin/e-smith/db yum_repositories set epel repository \

Name 'SME Server - epel' \
BaseURL 'http://<http://download.fedoraproject.org/pub/epel/7/$basearch' \
EnableGroups yes \
GPGCheck yes \
Visible no \
status disabled

To enable the changes:

    signal-event yum-modify

Just to be sure, give yum a fresh start:

    yum clean all

After adding it to the database we have to update the changes to the configuration file:

signal-event yum-modify

Installation

Install apcupsd

yum install --enablerepo=dag --enablerepo=base apcupsd

Copy original conf file

cp apcupsd.conf apcupsd.conf.orig

Copy CGI files

cp /var/www/apcupsd/* /home/e-smith/files/ibays/Primary/cgi-bin/

Link the startup script

ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S99apcupsd

Set the Service in SME

config set apcupsd service status enabled

Configuration

Edit /etc/apcupsd/apcupsd.conf. The conf file has good detail on setup options.

Suggest setting the TIMEOUT to 600 seconds; You shouldn't let UPS batteries run down to 5% (default) as this massively shortens their life. Set TIMEOUT to 10 for testing.

Reboot or

/etc/init.d/apcupsd start 

to start the service.

Usage

http://yourdomain.tld/cgi-bin/multimon.cgi gives a nice look at the UPS status, including a log of past events