使用 IPMI 管理 Linux 服务器

使用 IPMI 管理 Linux 服务器

安装 ipmitool

Debian 系

1
apt install -y ipmitool

RHEL 系

1
2
3
yum install -y ipmitool
# 或
dnf install -y ipmitool
1
2
3
4
5
6
# modprobe ipmi_msghandler
# modprobe ipmi_devintf
# modprobe ipmi_si

ipmitool user list 1
ipmitool user list 2

使用命令设置IPMI地址

1
2
3
4
5
6
7
8
# 查看当前设置
ipmitool lan print 1
ipmitool lan print 8

ipmitool lan set 1 ipsrc static #设置IPMI的IP地址配置方式未静态IP
ipmitool lan set 1 ipaddr 192.168.21.200 #设置IPMI的IP地址
ipmitool lan set 1 netmask 255.255.255.0 #设置IPMI的掩码
ipmitool lan set 1 defgw ipaddr 192.168.21.1 #设置IPMI的网关

重置服务器硬件管理口 IMM IPMI BMC 密码

1
ipmitool user set password 2 Lrh@3321

常见服务器 IPMI 初始密码

  • DELL 服务器: root\ calvin root \ root
  • 浪潮服务器: root \ superuser
  • 泰安主板: root \ superuser
  • 超微主板: ADMIN \ ADMIN
  • Lenvon: USERID \ PASSW0RD

远程管理其他服务器

1
2
3
4
5
6
7
8
9
bmc_ip=""
bmc_user="root"
bmc_passwd="root"

args="" # 要执行的参数

ipmitool -H ${bmc_ip} -I lanplus -U ${bmc_user} -P ${bmc_passwd} ${args}

alias remote_ipmitool='ipmitool -H ${bmc_ip} -I lanplus -U ${bmc_user} -P ${bmc_passwd}'

Licensed under CC BY-NC-SA 4.0
Built with Hugo
主题 StackJimmy 设计