Linux自宅サーバー構築
LinuxサーバーTOP
BBS
Linuxサーバー構築
INFORMATION
LINK
MAIL
 

 

UPS(APC SmartUPS500)の設定

最終更新 2003年6月23日

UPSの設定をします。これを設備しておくと停電しても心配なし。そして雷でやられる心配も軽減できます。付属しているケーブルでups本体とサーバのCOM1か2に接続します。また接続したポートがbios上で生きていることも確認しておきましょう。こちらのapcのウェブサイトよりrpmファイルを落としきましょう。会社情報などを入力する必要があります。PowerChute plus v.4.5.3 for Linux on i386 (for glibc-based distributions) RPM fileをおとしましょう。ダウンロードできたらプログラムのある場所まで移動して以下のコマンドを実行する

# rpm -ivh PowerChutePlus-4.5.3-1.i386.rpm
Preparing... ########################################### [100%]
1:PowerChutePlus ########################################### [100%]
You must run /usr/lib/powerchute/Config.sh to configure PowerChute plus

以上でインストールの終了です。

# cd /usr/lib/powerchute
# ./Config.sh

ほんじゃま設定いってみましょう

---------------------------------------------------------------------
PowerChute Plus for Linux v4.5.3 Configuration Script
Copyright American Power Conversion 2001
---------------------------------------------------------------------


1) Matrix-UPS
2) Smart-UPS
3) Back-UPS
4) Back-UPS Pro
5) Symmetra Power Array
6) Smart-UPS DP

Which APC Hardware will PowerChute Plus for UNIX be running with [?] 2

#UPSの形式選択

---------------------------------------------------------------------
The Measure-UPS is a device which is designed to perform environmental
monitoring in conjunction with PowerChute Plus for UNIX
---------------------------------------------------------------------

Do you currently have a Measure-UPS attached to the UPS? [y/n] y

#周辺機器に関してMatrix-UPS,Smart-UPS,Symmetra Power Arrayを選択した場合に表示されます。Measure-UPSは環境温度を監視するUPS用アクセサリで Measure-UPSを接続している場合はy、それ以外はnを選択します。 ほとんどの人がnよいです。私は間違えてyにしてしまったのですが(yを答えればいいだろうといつも思っている・・・)何も問題ありませんでした。以下の流れは上記質問をyですすめたものです。


---------------------------------------------------------------------
PowerChute Plus for UNIX is able to monitor other hosts. However, in order
to monitor other hosts TCP/IP must be installed. If you do not have
TCP/IP installed, answer 'n' to the following question.
---------------------------------------------------------------------

Do you currently have TCP/IP Installed? [y/n] y

#TCP/IPはインストールされていますかの質問

---------------------------------------------------------------------
If you will be using the Motif version of the User Interface on a
monochrome monitor, using the Monochrome Coloring scheme is recommended.

---------------------------------------------------------------------
1) Use Default Color scheme
2) Use Monochrome Color scheme

Which color scheme do you wish to use [1]? 1

#モニターはカラーか白黒かの質問

---------------------------------------------------------------------
PowerChute Plus for UNIX requires complete control of the serial port. No
processes, including gettys, are allowed to be accessing the port.
Therefore, the serial port you select must NOT be enabled for logins. To
ensure that PowerChute Plus for UNIX has control of the serial port, make
sure that it is not enabled for logins. To disable the port for logins
consult the PowerChute Plus for UNIX manual.
---------------------------------------------------------------------


1) /dev/ttyS0
2) /dev/ttyS1
3) Other

Which serial device will be dedicated to PowerChute Plus for UNIX [?] 1

#PCのケーブルのつながっているところの質問

----------------------------------------------------------------------
Command files may be executed with root privileges or with the
privileges you assign to the pwrchute account (allowing you to
customize command file execution according to your system
requirements).
----------------------------------------------------------------------

Do you want to execute command files as root? [y/n] y

#あんたはrootでコマンドを実行しますかの質問

----------------------------------------------------------------------
E-mail may be sent with root privileges or with the privileges you
assign to the pwrchute account.
----------------------------------------------------------------------

Do you want to send e-mail as root? [y/n] y

#なんかあったらrootにメールするかの質問

----------------------------------------------------------------------
PRODUCT : PowerChute Plus for UNIX
DEDICATED TTY : /dev/ttyS0
UPS TYPE : Smart-UPS
Measure-UPS INSTALLED : TRUE
INSTALLING AS ROOT : TRUE
TCP/IP Installed : TRUE
RUN COMMAND FILES AS ROOT : TRUE
SEND EMAIL AS ROOT : TRUE
----------------------------------------------------------------------

Are the above selections correct? [y/n] y

#これでいいっすか?の質問

Checking for binary compatibility...
binary compatibility VERIFIED

/dev/ttyS0 verified as a valid tty

The following Port validations for /dev/ttyS0 may take a few moments....
/dev/ttyS0 appears to be a local control port

making backup copy of shutdown files...
modifying shutdown files....

UPS communications on /dev/ttyS0 verified
Done.

Eeproms okay.

The PowerChute plus User Interface will prompt you for a password when you attempt
to connect to the upsd daemon running on this machine. This password is the
password of the pwrchute user account.

Adding a pwrchute user account
Please set the password for the pwrchute user account.
Changing password for user pwrchute.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
----------------------------------------------------------------------
PowerChute Plus for UNIX Installation complete. You will need to reboot
in order to start the application
----------------------------------------------------------------------

上記指示が出たら再起動です。upsdはランレベル3と5で起動するよう設定されています。

# /etc/init.d/upsd start
PowerChute Plus for UNIX, v4.5.3: Copyright (c) 2001, Ameri[ OK ]r Conversion

それではUPSの電源を抜いてみましょう。ブチッ!!ピーピーピー・・・・・・

gw01 is running on battery power. gw01 will shutdown in 2 minutes and 55 seconds
Jun 22 18:23:29 gw01 wall[19185]: wall: user root broadcasted 3 lines (87 chars)

Broadcast message from root (Sun Jun 22 18:23:59 2003):

gw01 is running on battery power. gw01 will shutdown in 2 minutes and 25 seconds
Jun 22 18:23:59 gw01 wall[19190]: wall: user root broadcasted 3 lines (87 chars)

Broadcast message from root (Sun Jun 22 18:24:29 2003):

gw01 is running on battery power. gw01 will shutdown in 1 minutes and 55 seconds
Jun 22 18:24:29 gw01 wall[19219]: wall: user root broadcasted 3 lines (87 chars)

# tail -f /var/log/messages において上記メッセージが流れていました。

以上のようにシャットダウンまで行きました。ここで私はミスったんですが・・・upsにPC2台、ルータ、ハブ、などいろいろなものを接続していたらこのあと最後までシャットダウンする前に電池が切れてしまいました・・・・・接続する機器を少なくするかシャットダウンするまでの時間を短くするかの対策が必要ですか・・


linuxトップ

 


linux自宅サーバーPAOPAO
リンクはご自由に!
yasu@paopao.org
 
パオパオ、ぱおぱお