原本是要安裝iDRAC6的,可是按說明插上iDRAC6後開機按ctrl+E後 並無預想的那樣進入iDRAC6配置界面,而是進入了IPMI的配置界面,後來聯繫戴爾工程師後才知道 咱們的服務器是R200,是不支持iDRAC6的,R200是戴爾9-10代服務器,支持iDRAC4,若是是10代能夠支持iDRAC5 11代出來iDRAC6 ,因此,沒辦法只能配置IPMI做爲遠程管理接口了。linux
安裝配置IPMIweb
1、ipmitool
該工具能夠用於設置ipmi的ip等。
一、環境檢測
# dmidecode |sed -n '/IPMI/,+5p'
若是能看到IPMI信息,就說明支持ipmi,好比下面DELL R200的輸出,Version爲1.5
IPMI Device Information
Interface Type: KCS (Keyboard Control Style)
Specification Version: 1.5
I2C Slave Address: 0x10
NV Storage Device: Not Present
Base Address: 0x0000000000000CA8 (I/O)服務器
2.安裝ipmitoolide
wget http://downloads.sourceforge.net/project/ipmitool/ipmitool/1.8.11/ipmitool-1.8.11.tar.gz工具
tar -xvzf ipmitool-1.8.11.tar.gzspa
./configure.net
makedebug
make installrest
三、設置本機的IPMI還須要啓動ipmi服務code
yum install OpenIPMI
service ipmi start
四、LAN configuration
一共有16個channel,找到所使用的channel
for i in `seq 1 14`; do ipmitool lan print $i 2>/dev/null | grep -q ^Set && echo Channel $i; done
ipmitool -I open lan print 1 顯示BMC通道的信息,若是不知道BMC使用的是哪一個通道,請使用下面的命令確認:
ipmitool -I open channel info 1
ipmitool -I open lan set 1 ipsrc static 設置本地BMC地址爲靜態,才能設置IP
ipmitool -I open lan set 1 ipaddr 10.53.11.113 設置本地BMC的IP地址
ipmitool -I open lan set 1 netmask 255.255.255.0 子網掩碼,別忘了設
ipmitool -I open lan set 1 defgw ipaddr 10.53.11.254 網關,可設可不設,不過必定要確保監控它的機器位於同一路由
ipmitool user list 1 查看BMC的用戶列表
ipmitool user set name 1 username 對BMC的1號用戶設置用戶名username
ipmitool user set password 1 123456 對BMC的1號用戶設置密碼123456
關於lan:
lan用於遠程訪問,電源管理等。
open用於本地訪問。
lanplus用於sol
五、一旦設置好ip,就能夠經過遠程服務器來更改ipmi的配置了。可是遠程服務器需先安裝ipmitool
ipmitool -I lan -U root -P wowcool321??? -H 210.77.146.102 power status
關於debug
ipmitool -vv -I lanplus -U ipmiuser -P password -H 172.168.6.3 power status
2、ipmitool 經常使用命令
# ipmitool -I lan -H 172.168.6.3 -U root -P 密碼 power off (硬關機,直接切斷電源)
# ipmitool -I lan -H 172.168.6.3 -U root -P 密碼 power soft (軟關機,即如同輕按一下開機扭,對於linux,服務器將halt,power status 爲off)
# ipmitool -I lan -H 172.168.6.3 -U root -P 密碼 power on (硬開機)
# ipmitool -I lan -H 172.168.6.3 -U root -P 密碼 power reset (硬重啓)
# ipmitool -I lan -H 172.168.6.3 -U root -P 密碼 power status ( 獲取當前電源狀態)
# ipmitool -I lanplus -U root -P "password" -H 172.168.6.3 sensor get "Ambient Temp"| /bin/grep -i "Sensor Reading"|/bin/cut -c 26-28 //獲取機箱溫度.
ipmitool -I lanplus -U root -P "wowcool321???" -H 210.77.146.102 sensor get "Ambient Temp"| /bin/grep -i "Sensor Reading"|/bin/cut -c 26-28
具體的命令本身去查,這裏只講關鍵的:
ipmitool -I open sensor thresh 配置ID值等於id的監測項的各類限制值。
ipmitool -I open chassis status 查看主板狀態,其中包括了主板電源信息,主板工做狀態等
ipmitool -I open chassis restart_cause 查看上次系統重啓的緣由
ipmitool -I open chassis policy list 查看支持的底盤電源相關策略。
ipmitool -I open chassis power on 啓動底盤,用此命令可以遠程開機
ipmitool -I open chassis power off 關閉底盤,用此命令可以遠程關機
ipmitool -I open chassis power reset實現硬重啓,用此命令可以遠程重啓
ipmitool -I open mc reset 使BMC從新硬啓動
ipmitool -I open mc info 查看BMC硬件信息
ipmitool -I open mc setenables =[on|off],配置bmc相應的容許/禁止選項。
ipmitool -I open mc getenables 列出BMC任何容許的選項
ipmitool -I open lan print 1 打印現咱channel 1的信息 。