User Tools

Site Tools


apcupsd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
apcupsd [2009/10/13 06:55] 172.26.0.166apcupsd [2011/09/02 12:13] – [Daemon] aorth
Line 5: Line 5:
 ===== Installation ===== ===== Installation =====
  
-Download source RPM from: http://www.apcupsd.com/dl.php+Download source from: http://www.apcupsd.com/
  
-Build the RPM (make sure your environment is set up as in [[custom_rpms]])+<code>$ tar zxf apcupsd-3.14.7.tar.gz 
-<code>$ rpm --rebuild apcupsd-3.14.7-1.src.rpm +$ cd apcupsd-3.14.7 
-$ sudo rpm -i ~/rpmbuild/RPMS/x86_64/apcupsd-3.14.7-1.x86_64.rpm</code>+$ ./configure --enable-usb --enable-cgi 
 +make</code> 
 +Because I am afraid of doing ''make install'' I will make my own RPM using checkinstall
 +<code>sudo /usr/sbin/checkinstall -R 
 +$ sudo rpm ---test -vv ~/rpmbuild/RPMS/x86_64/apcupsd-3.14.7-1.x86_64.rpm 
 +$ sudo rpm -i --force ~/rpmbuild/RPMS/x86_64/apcupsd-3.14.7-1.x86_64.rpm</code> 
 + 
 +Add the daemon to the default runlevels: 
 +<code>$ sudo chkconfig --level 2345 apcupsd on</code>
  
 ===== Configuration ===== ===== Configuration =====
Line 18: Line 26:
  
 === /etc/apcupsd/hosts.conf === === /etc/apcupsd/hosts.conf ===
-Make sure to list the the localhost and give it a name.  This is used for remote monitoring and also for checking the status via the multimon CGI script: http://hpc.ilri.cgiar.org/cgi-bin/multimon.cgi+Make sure to list the the localhost and give it a name.  This is used for remote monitoring and also for checking the status via the multimon CGI script:
 <file># Network UPS Tools - hosts.conf <file># Network UPS Tools - hosts.conf
 # #
Line 48: Line 56:
 ==== Web monitoring interface ==== ==== Web monitoring interface ====
  
-The ''apcupsd'' package comes with a web-based frontend to the daemon which monitors battery status and generates graphs.  The files need to be placed in the filesystem where Apache has been configured to allow scripts to run.  This is usually a ''cgi-bin'' folder.  Copy the contents of ''/etc/apcupsd/cgi/'' to ''/var/www/cgi-bin/'' and then you can try to check the status by visiting http://hpc.ilri.cgiar.org/cgi-bin/multimon.cgi+The ''apcupsd'' package comes with a web-based frontend to the daemon which monitors battery status and generates graphs.  The files need to be placed in the filesystem where Apache has been configured to allow scripts to run. 
 + 
 +Copy the CGI scripts: 
 +<code>$ cd /etc/apcupsd 
 +$ sudo cp multimon.cgi upsimage.cgi upsstats.cgi /var/www/cgi-bin/</code> 
 + 
 +Check the status by visiting http://hpc.ilri.cgiar.org/cgi-bin/multimon.cgi
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
apcupsd.txt · Last modified: 2011/09/02 12:42 by aorth