1.下載ipmitool:http://ipmitool.sourceforge.net/
2.確定gcc工具已經安裝好
which gcc
3. 在Linux系統(Red Hat Enterprise Linux Server release 7.5 (Maipo))上加載啟用IPMI驅動:
insmod /lib/modules/3.10.0-862.el7.x86_64/kernel/drivers/char/ipmi/ipmi_msghandler.ko.xz
insmod /lib/modules/3.10.0-862.el7.x86_64/kernel/drivers/char/ipmi/ipmi_devintf.ko.xz
insmod /lib/modules/3.10.0-862.el7.x86_64/kernel/drivers/char/ipmi/ipmi_si.ko.xz
4. 檢查你的/dev目錄下出現了ipmi0這個設備:
ls -l /dev/ipmi0
5. 解壓縮ipmitool-1.8.18.tar.bz2
tar –jxv -f ipmitool-1.8.18.tar.bz2
cd ipmitool-1.8.18
6. 開始安裝ipmitool:
./configure
make
make install
7. ipmitool命令將被安裝到/usr/local/bin/ipmitool
8. 注意需要depmod保存當前驅動的依賴關系,防止重啟后需要重新加載(service ipmi start)
9. ipmitool lan print可以查看當前HDM的地址
#查看目前登錄地址對應的channel number,目前channel number 8 對應的IP地址是192.168.1.2,這個不是我們預設的HDM管理地址!
[root@sodweb01 ~]# ipmitool lan print 8
Set in Progress : Set Complete
Auth Type Support : MD5
Auth Type Enable : Callback : MD5
: User : MD5
: Operator : MD5
: Admin : MD5
: OEM : MD5
IP Address Source : Static Address
IP Address : 192.168.1.2
Subnet Mask : 255.255.255.0
MAC Address : 80:e4:55:9c:7e:63
SNMP Community String : AMI
IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl : 0.0 seconds
Default Gateway IP : 0.0.0.0
Default Gateway MAC : 00:00:00:00:00:00
Backup Gateway IP : 0.0.0.0
Backup Gateway MAC : 00:00:00:00:00:00
802.1q VLAN ID : Disabled
802.1q VLAN Priority : 0
RMCP+ Cipher Suites : 0,1,2,3,6,7,8,11,12,15,16,17
Cipher Suite Priv Max : caaaaaaaaaaaXXX
[root@sodweb01 ~]# ipmitool lan print 1
#目前channel number 1 對應的IP地址是10.216.94.101,這個是我們預設的HDM管理地址!
Set in Progress : Set Complete
Auth Type Support : MD5
Auth Type Enable : Callback : MD5
: User : MD5
: Operator : MD5
: Admin : MD5
: OEM : MD5
IP Address Source : Static Address
IP Address : 10.216.94.101
Subnet Mask : 255.255.255.0
MAC Address : 80:e4:55:9c:7e:64
SNMP Community String : AMI
IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl : 0.0 seconds
Default Gateway IP : 10.216.94.1
Default Gateway MAC : 54:2b:de:ac:02:01
Backup Gateway IP : 0.0.0.0
Backup Gateway MAC : 00:00:00:00:00:00
802.1q VLAN ID : Disabled
802.1q VLAN Priority : 0
RMCP+ Cipher Suites : 0,1,2,3,6,7,8,11,12,15,16,17
Cipher Suite Priv Max : caaaaaaaaaaaXXX
10. 設置新用戶chenfuhai,此處9是指在HDM管理用戶的編號是9(隨意選的,數字不能大于16),系統默認1是匿名用戶(anonymous),2是管理員用戶(admin)
ipmitool user set name 9 chenfuhai
11. 設置用戶密碼
ipmitool user set password 9 Sodweb01?%
12. 啟用用戶,否則登錄顯示沒有權限
ipmitool user enable 9
13. 設置用戶為管理權限,最后的數字1是指 channel number,這個是必須的! 0x4 代表管理員權限
ipmitool user priv 9 0x4 1
14. 用新建賬號登錄到HDM去修改admin的密碼即可