CentOS中文网

CentOS安装ipmi

CentOS中文网 https://www.centos.net.cn 2015-05-07 00:39 出处:网络 编辑:@iCMS
CentOSrelease6.2(Final) 一、安装所需软件 1、查询下ipmi安装包 yumlist|grepipmi ipmitool.x86_641.8.11-13.el6.1@updates

CentOSrelease6.2(Final)

一、安装所需软件

1、查询下ipmi安装包

yumlist|grepipmi

ipmitool.x86_641.8.11-13.el6.1@updates

ipmitool.x86_641.8.11-14.el6_4.1update

2、安装ipmitool

yum-yinstallipmitool

3、查看已安装的ipmi包

rpm-qa|grepipmi

ipmitool-1.8.11-13.el6.1.x86_64

4、将ipmi服务添加到启动项

chkconfigipmion

5、5.1和5.2二选一查看

5.1)、ls/etc/rc3.d/S13ipmi

lrwxrwxrwx1rootroot14May616:26/etc/rc3.d/S13ipmi->../init.d/ipmi

5.2)、chkconfig--list|grepipmi

ipmi0:off1:off2:on3:on4:on5:on6:off

6、加载ipmi模块

modprobeipmi_si&&modprobeipmi_devintf&&modprobeipmi_msghandler

7、查看模块

lsmod|grepipmi

ipmi_si424010

ipmi_devintf80490

ipmi_msghandler359922ipmi_si,ipmi_devintf

8、启动ipmi

/etc/init.d/ipmistart

二、配置grub启动参数

cat/boot/grub/grub.conf|egrep-v"^#|^$"

default=0

timeout=5

titleCentOS(2.6.32-220.el6.x86_64)

root(hd0,0)

kernel/boot/vmlinuz-2.6.32-220.el6.x86_64roroot=/dev/sda1selinux=0console=tty0console=ttyS1,115200ro

initrd/boot/initramfs-2.6.32-220.el6.x86_64.img

PS:添加console=tty0console=ttyS1,115200在这个配置文件里

console=tty0console=ttyS1,115200参数传递到内核中,实现串口重定向

console=tty0代表显示器输出

console=ttyS0代表定向到串口1,如果是ttyS1代表定向到串口2

115200则为串口通信采用的波特率,波特率和bios设置的一样

三、通过ipmitool命令还可以对ipmi进行配置

1、查看ipmi信息

ipmitoollanprint1

2、设置BMCip,作为远程管理ip

ipmitoollanset1ipaddr172.16.*.*

3、连接目标终端

ipmitool-Ilanplus-H172.16.1.-Uroot-P123456solactivate

4、结束目标终端

ipmitool-Ilanplus-H172.16.1.-Uroot-P123456soldeactivate

5、重启目标终端

ipmitool-Ilanplus-H172.16.1.-Uroot-P123456powerreset

6、查看电源情况

ipmitool-Ilanplus-H172.16.1.-Uroot-P123456powerstatus

7、开机

ipmitool-Ilanplus-H172.16.1.-Uroot-P123456poweron

8、关机

ipmitool-Ilanplus-H172.16.1.-Uroot-P123456poweroff

9、修改bios启动项为网络启动

ipmitool-Ilanplus-H172.16.1.-Uroot-P123456chassisbootdevpxe

10、设置channel1允许访问

ipmitool-Iopenlanset1accesson

11、配置ipmi管理用户

ipmitoolusersetname2root

ipmitoolusersetpassword2"123456"

12、获取传感器中的各种监测值和该值的监测阈值,包括(CPU温度,电压,风扇转速,电源调制模块温度,电源电压等信息)

ipmitool-Iopensdrlist(ipmitool-Iopensensor)

13、显示温度

ipmitoolsdrtypeTemperature

Temp|01h|ok|3.1|-56degreesC

Temp|02h|ok|3.2|50degreesC

Temp|05h|ok|10.1|42degreesC

Temp|06h|ns|10.2|Disabled

AmbientTemp|0Eh|ok|7.1|20degreesC

PlanarTemp|0Fh|ok|7.1|37degreesC

CPUTempIF|76h|ns|7.1|Disabled

Temp|0Ah|ok|8.1|31degreesC

Temp|0Bh|ns|8.1|Disabled

Temp|0Ch|unc|8.1|45degreesC

AmbientTemp|07h|ok|10.1|29degreesC

AmbientTemp|08h|ns|10.2|Disabled

当然也可以ipmitoolsdrtype直接回车

ipmitoolsdrtype

SensorTypes:

TemperatureVoltage

CurrentFan

PhysicalSecurityPlatformSecurity

ProcessorPowerSupply

PowerUnitCoolingDevice

OtherMemory

DriveSlot/BayPOSTMemoryResize

SystemFirmwaresEventLoggingDisabled

WatchdogSystemEvent

CriticalInterruptButton

Module/BoardMicrocontroller

Add-inCardChassis

ChipSetOtherFRU

Cable/InterconnectTerminator

SystemBootInitiatedBootError

OSBootOSCriticalStop

Slot/ConnectorSystemACPIPowerState

WatchdogPlatformAlert

EntityPresenceMonitorASIC

LANManagementSubsystemHealth

BatterySessionAudit

VersionChangeFRUState

14、退出ipmi

shift~.

ipmitool命令参数说明

lan用于远程访问,电源管理等。open用于本地访问。lanplus用于sol。

三、inittab配置(因版本不同配置有相应的变动)

cat/etc/inittab|egrep-v"^#|^$"

co:2345:respawn:/sbin/agettyttyS1115200vt100-nav

设置ipmi必须需要注意有的时候是ttyS1有的时候ttyS0根据情况更改ttyS1还是ttyS0

/etc/inittab如何生效?

生效的话需要执行initq(Qorqtellinittore-examinethe/etc/inittabfile.)

psaux|greptty

root11370.00.04072228ttyS1Ss+20130:00/sbin/agetty/dev/ttyS1115200vt100-nav

或执行startttyS1

0

精彩评论

暂无评论...
验证码 换一张
取 消