備忘步驟
QTS 4.3以後:
安裝
opkg install apcupsd-cgi
修改設定檔
chmod 777 /etc/apcupsd/apcupsd.conf vi /etc/apcupsd/apcupsd.conf
修改 NISIP 必須是你主機IP或是同網段
NISIP <IP>
其他項目檢查,應該目前都是USB的了。
UPSNAME
UPSCABLE usb
UPSTYPE usb
修改完成後將權限改回644
chmod 644 /etc/apcupsd/apcupsd.conf
然後啟動apcupsd
/sbin/apcupsd start
mkdir /share/Web/apcups cd /share/Web/apcups ln -s /share/CACHEDEV1_DATA/.qpkg/Entware-ng/share/www/cgi-bin/apcupsd/multimon.cgi multimon.cgi ln -s /share/CACHEDEV1_DATA/.qpkg/Entware-ng/share/www/cgi-bin/apcupsd/upsfstats.cgi upsfstats.cgi ln -s /share/CACHEDEV1_DATA/.qpkg/Entware-ng/share/www/cgi-bin/apcupsd/upsimage.cgi upsimage.cgi ln -s /share/CACHEDEV1_DATA/.qpkg/Entware-ng/share/www/cgi-bin/apcupsd/upsstats.cgi upsstats.cgi chmod +x *.cgi
vi /etc/config/apache/apache.conf 加入
<Directory "/share/Web/apcups"> Order allow,deny Allow from all AllowOverride None Options FollowSymLinks +ExecCGI AddHandler cgi-script .cgi </Directory>
/etc/init.d/Qthttpd.sh restart
http://ip/apcups/multimon.cgi
QTS 4.3以前
ipkg install apcupsd-cgi vi /etc/apcupsd/apcupsd.conf
檢查一下設定
NISIP <IP> UPSNAME UPSCABLE usb UPSTYPE usb
然後啟動apcupsd
/sbin/apcupsd start
mkdir /share/Web/apcups cd /share/Web/apcups ln -s /share/MD0_DATA/.qpkg/Optware/share/www/cgi-bin/multimon.cgi multimon.cgi ln -s /share/MD0_DATA/.qpkg/Optware/share/www/cgi-bin/upsfstats.cgi upsfstats.cgi ln -s /share/MD0_DATA/.qpkg/Optware/share/www/cgi-bin/upsimage.cgi upsimage.cgi ln -s /share/MD0_DATA/.qpkg/Optware/share/www/cgi-bin/upsstats.cgi upsstats.cgi chmod +x *.cgi
vi /etc/config/apache/apache.conf 加入
<Directory "/share/Web/apcups"> Order allow,deny Allow from all AllowOverride None Options FollowSymLinks +ExecCGI AddHandler cgi-script .cgi </Directory>
/etc/init.d/Qthttpd.sh restart
http://ip/apcups/multimon.cgi
完成!