原本是要安装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的信息 。