差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:apcupsd [2008/07/24 18:31] jonathantech:apcupsd [2025/10/17 11:01] (目前版本) – [安裝 APCUPSD 監看 APC 的 UPS 供電狀況系統] jonathan
行 1: 行 1:
 +====== 安裝 APCUPSD 監看 APC 的 UPS 供電狀況系統 ======
 +  * 網址 : http://www.apcupsd.org/
 +  * 打算要完成的架構如下 :
  
 +<mermaid>
 +graph TD
 +    APC["APC<br/>UPS"]
 +    E2160["E2160<br/>APCUPSD<br/>Master"]
 +    VMweb["vm-web<br/>APCUPSD<br/>Slave"]
 +    Browser["User Browser"]
 +    
 +    APC -->|"監控連線"| E2160
 +    E2160 <-->|"網路通訊"| VMweb
 +    Browser -->|"Web 介面"| VMweb
 +    
 +    style APC fill:#ffe1e1,stroke:#333,stroke-width:2px
 +    style E2160 fill:#fff4e1,stroke:#333,stroke-width:2px
 +    style VMweb fill:#e1ffe1,stroke:#333,stroke-width:2px
 +    style Browser fill:#e1f5ff,stroke:#333,stroke-width:2px
 +</mermaid>
 +
 +===== 下載與安裝 =====
 +<note>
 +如果已經安裝 rpmforge 就可以 <code sh>
 +yum install apcupsd
 +</code>
 +直接安裝
 +</note>
 +<file>
 +su - root
 +wget http://nchc.dl.sourceforge.net/sourceforge/apcupsd/apcupsd-3.14.14.tar.gz
 +tar -zxvf apcupsd-3.14.14.tar.gz
 +cd apcupsd-3.14.14
 +./configure --enable-cgi
 +make
 +make install
 +</file>
 +<note warning>
 +如果出現缺少 g++, 就必須安裝 gcc-c++, 缺少 gd / gdlib 就必須安裝 gd gd-devel
 +<code>
 +yum install gcc-c++ gd gd-devel
 +</code>
 +</note>
 +
 +===== 調整設定檔 =====
 +<code>
 +vi /etc/apcupsd/apcupsd.conf
 +</code>
 +<file>
 +:
 +NETTIME 60
 +:
 +UPSCLASS sharemaster
 +:
 +UPSMODE share
 +:
 +STATTIME 60
 +:
 +UPSNAME Trysoft
 +:
 +</file>
 +
 +===== 啟動服務 =====
 +<code>
 +service apcupsd start
 +chkconfig apcupsd on
 +chkconfig --list | grep apcupsd
 +</code>
 +
 +之後可以在 /var/log/ 底下看到 apcupsd.status 與 apcupsd.events 兩個檔案
 +
 +===== 參考資料 =====
 +  * http://lists.centos.org/pipermail/centos/2006-April/063185.html
 +
 +{{tag>apc ups centos 安裝}}