jlbhs.gif (6180 バイト) jlb.jp/hsinstall8s/apcupsd3_10_15

 

TL8S に apcupsd-3.10.15 をインストールする。
 2004/08/08

 

 

 

<凡例>
赤字=入力する文字列
青字=表示される文字列(コンソール画面)
紫字=エディタ等で入力する文字列
緑字=特に強調するコメント等
  使わなくなった古い記述。

 


7月に 3.10.11 ( apcupsd3_10 )をインストールしたばかりですが、セルフテストの日時等が記録されていないのを発見しました。

また apcupsd のサイトを見てみると安定版(Stable)の欄から 3.10.11 が消えており、今日時点の最新版として 3.10.15 がアップされていました。
そこで、時間もあることから最新版をインストールしてみることにしました。

インストールメモとして掲載しておきます。
対象UPSは、 APC SU 700 です。
また、最新の apcupsd は、 www.apcupsd.com から入手しました。

右の画像は、セルフテストSWを押して、それが記録されている状態の 3.10.15 の画像です。(画像拡大あり)

1.いつもどおりRedHatに化ける。

Turbolinuxでは、RedHat に化ける必要がある(今も必要だと思います)ためにファイルを作ります。


redhat-release というファイルを作ります。
#
touch /etc/redhat-release
vi /etc/redhat-release



ちなみに、今回はカーネル 2.4 ということで、RH8.0用の記述を使いました。

Red Hat Linux release 8.0 (Psyche)      になります。

 

2.以前の apcupsd を削除する。(以前は 3.10.11 を想定)

 

以前のバージョンがインストールされている場合、ファイルを削除しないとうまくいきません。
関連するファイルをまず削除しました。

まず最初に apcupsd をストップします。
[root@hs8 cgi-bin]# /etc/rc.d/init.d/apcupsd stop

旧ファイルを削除

[root@hs8 etc]# cd /var/www/cgi-bin/
[root@hs8 cgi-bin]# rm multi*
rm: remove `multimon.cgi'? y
rm: remove `multimoncss.cgi'?
y
[root@hs8 cgi-bin]# rm ups*
rm: remove `upsfstats.cgi'?
y
rm: remove `upsimage.cgi'?
y
rm: remove `upsstats.cgi'?
y
[root@hs8 cgi-bin]# rm -rf /etc/apcupsd/
[root@hs8 cgi-bin]#

強制一発削除用に再記述しておきます。

cd /var/www/cgi-bin/
rm -f multi*
rm -f ups*
rm -rf /etc/apcupsd/

 

3. apcupsd-3.10.15 をインストールする。

 


FTPで /usr/local/src/apcupsd31015/ にソースファイルを移す。( apcupsd31015 は任意)
インストールは、 root 権限で以下の作業をしました。

[root@hs8 root]# cd /usr/local/src/apcupsd31015/

[root@hs8 apcupsd31015]# tar zxvf apcupsd-3.10.15.tar.gz

[root@hs8 apcupsd31015]# cd apcupsd-3.10.15


./configure は、一つ前のインストール時にわかった記述( apcupsd3.10.11 で使用 )を入力します。

[root@hs8 apcupsd31015]# ./configure --enable-cgi --with-cgi-bin=/var/www/cgi-bin

 


--出力画面--(略)

Configuration on Sun Aug  8 09:45:44 JST 2004:

  Host:                       i686-pc-linux-gnu -- redhat 8.0
  Apcupsd version:            3.10.15 (04 August 2004)
  Source code location:       .
  Install binaries:           /sbin
  Install config files:       /etc/apcupsd
  Install man files:          /usr/man
  Nologin file in:            /etc
  PID directory:              /var/run
  LOG dir (events, status)    /var/log
  LOCK dir (for serial port)  /var/lock
  Power Fail dir              /etc/apcupsd
  Compiler:                   gcc 2.96
  Compiler flags:              -g -O2 -Wall
  Loader flags:                -g -O
  Host and version:           redhat 8.0
  Shutdown Program:           /sbin/shutdown
  Port/Device:                /dev/ttyS0
  Network Info Port (CGI):    3551
  Master/slave Port:          6666
  UPSTYPE                     smartups
  UPSCABLE                    smart

  drivers (no-* are disabled): apcsmart dumb no-net no-usb no-snmp no-test

  enable-master-slave:        no
  enable-nis:                 yes
  with-nisip:                 0.0.0.0
  enable-cgi:                 yes
  with-cgi-bin:               /var/www/cgi-bin
  with-libwrap:
  enable-nls:                 no
  enable-libintl:             no
  enable-powerflute:          no
  enable-pthreads:            yes
  enable-dist-install:        yes
[root@hs8 apcupsd-3.10.15]#


make
make install



(省略)
=================================================

apcupsd script installation for RedHat 8.0 complete.

You should now edit /etc/apcupsd/apcupsd.conf to correspond
to your setup then start the apcupsd daemon with:

/etc/rc.d/init.d/apcupsd start

thereafter when you reboot, it will be stopped and started
automatically.

Please check that your halt script in:
/etc/rc.d/init.d/halt
was properly updated (see installation section of manual)

=================================================
make[2]: ここから出ます: ディレクトリ `/usr/local/src/apcupsd31015/apcupsd-3.10.15/platforms/redhat'
Installing apccontrol script...
(cd etc/; /usr/bin/make DESTDIR= install)
make[2]: ここに入ります: ディレクトリ `/usr/local/src/apcupsd31015/apcupsd-3.10.15/platforms/etc'
Installing apcupsd.conf...
make[2]: ここから出ます: ディレクトリ `/usr/local/src/apcupsd31015/apcupsd-3.10.15/platforms/etc'
make[1]: ここから出ます: ディレクトリ `/usr/local/src/apcupsd31015/apcupsd-3.10.15/platforms'
make[1]: ここに入ります: ディレクトリ `/usr/local/src/apcupsd31015/apcupsd-3.10.15/autoconf'
make[1]: `install' に対して行うべき事はありません。
make[1]: ここから出ます: ディレクトリ `/usr/local/src/apcupsd31015/apcupsd-3.10.15/autoconf'
[root@hs8 apcupsd-3.10.15]#


一通り正常に進んで、起動をかけます。

[root@hs8 apcupsd-3.10.15]# apcupsd start

すると、下の画像のように、バックカラー(ミドリ色)が付いた画面が出ます。よく分かりませんが、 3.10.13 から改善されたようです。 

 

 

 

4.apcupsd.conf を設定する。


[root@hs8 apcupsd-3.10.15]#

vi /etc/apcupsd/apcupsd.conf

Smart UPSの場合、下記1箇所の変更をしました。(初期値のままでも OK )

他は「APC製UPSメモ」サイトを参照するか、初期値のままで OK と思われます。

TIMEOUT 120           (def=0)

5.起動の設定



電源ON時の自動起動の設定ですが、そのままで自動的に起動するようです。

手動での起動は

/etc/rc.d/init.d/apcupsd start  (スタート)
/etc/rc.d/init.d/apcupsd status  ステータス
/etc/rc.d/init.d/apcupsd stop  (ストップ)
です。


上記の記述以外にも  # apcupsd start      でもOKです。 

現在のApcupsd画面見本

夏場を乗り切るための冷却ファンの取り付けは、 3.10.11 のインストールページに有ります。