Install ipmi on CentOS
CentOSrelease6.2(Final)
1. install required software
1. query the ipmi installation package
yumlist|
grep
ipmi
ipmitool.x86_641.8.11-13.el6.1@updates
ipmitool.x86_641.8.11-14.el6_4.1update
2. Install ipmitool
yum-y
install
ipmitool
3. view the installed ipmi package
rpm-qa|
grep
ipmi
ipmitool-1.8.11-13.el6.1.x86_64
4. Add the ipmi service to the startup Item
chkconfigipmion
Choose either 5, 5.1, or 5.2.
5.1)、
ls
/etc/rc3
.d
/S13ipmi
lrwxrwxrwx1rootroot14May616:26
/etc/rc3
.d
/S13ipmi
->..
/init
.d
/ipmi
5.2)、chkconfig--list|
grep
ipmi
ipmi0:off1:off2:on3:on4:on5:on6:off
6. Load the ipmi Module
modprobeipmi_si&&modprobeipmi_devintf&&modprobeipmi_msghandler
7. view the module
lsmod|
grep
ipmi
ipmi_si424010
ipmi_devintf80490
ipmi_msghandler359922ipmi_si,ipmi_devintf
8. Start ipmi
/etc/init
.d
/ipmi
start
2. Configure grub startup parameters
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/sda1
selinux=0console=tty0console=ttyS1,115200ro
initrd
/boot/initramfs-2
.6.32-220.el6.x86_64.img
PS: Add console = tty0console = ttyS1, 115200 in this configuration file
Console = tty0console = ttyS1, 115200 parameters are passed to the kernel for serial port redirection
Console = tty0 stands for display output
Console = ttyS0 indicates directed to serial 1, and ttyS1 indicates directed to Serial 2
115200 indicates the baud rate used for serial communication. The baud rate is the same as that set in bios.
3. Use the ipmitool command to configure ipmi.
1. View ipmi Information
ipmitoollanprint1
2. Set BMCip as the remote management ip Address
ipmitoollan
set
1ipaddr172.16.*.*
3. connect to the target Terminal
ipmitool-Ilanplus-H172.16.1.-Uroot-P123456solactivate
4. End the target Terminal
ipmitool-Ilanplus-H172.16.1.-Uroot-P123456soldeactivate
5. Restart the target terminal.
ipmitool-Ilanplus-H172.16.1.-Uroot-P123456powerreset
6. View Power Supply
ipmitool-Ilanplus-H172.16.1.-Uroot-P123456powerstatus
7. boot
ipmitool-Ilanplus-H172.16.1.-Uroot-P123456poweron
8. Shutdown
ipmitool-Ilanplus-H172.16.1.-Uroot-P123456poweroff
9. Change the bios startup Item to network startup.
ipmitool-Ilanplus-H172.16.1.-Uroot-P123456chassisbootdevpxe
10. Set channel1 to allow access
ipmitool-I
open
lan
set
1accesson
11. Configure ipmi to Manage Users
ipmitooluser
set
name2root
ipmitooluser
set
password2
"123456"
12. obtain various monitoring values in the sensor and the monitoring thresholds for these values, including (CPU temperature, voltage, fan speed, power modulation module temperature, power supply voltage, and other information)
ipmitool-I
open
sdrlist(ipmitool-I
open
sensor)
13. display temperature
ipmitoolsdr
type
Temperature
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
You can also use ipmitoolsdr.
type
Press ENTER
ipmitoolsdr
type
SensorTypes:
TemperatureVoltage
CurrentFan
PhysicalSecurityPlatformSecurity
ProcessorPowerSupply
PowerUnitCoolingDevice
OtherMemory
DriveSlot/BayPOSTMemoryResize
SystemFirmwaresEventLoggingDisabled
WatchdogSystemEvent
CriticalInterruptButton
Module/BoardMicrocontroller
Add-
in
CardChassis
ChipSetOtherFRU
Cable/InterconnectTerminator
SystemBootInitiatedBootError
OSBootOSCriticalStop
Slot/ConnectorSystemACPIPowerState
WatchdogPlatformAlert
EntityPresenceMonitorASIC
LANManagementSubsystemHealth
BatterySessionAudit
VersionChangeFRUState
14. Exit ipmi
shift
~.
Ipmitool command parameter description
Lan is used for remote access and power management.
open
For local access. Lanplus is used for sol.
3. inittab configuration (changed due to different versions)
cat
/etc/inittab
|
egrep
-
v
"^#|^$"
co:2345:respawn:
/sbin/agetty
ttyS1115200vt100-nav
When setting ipmi, you must note that ttyS1 and ttyS0 change ttyS1 or ttyS0 as needed.
/etc/inittab
How does it take effect?
If it takes effect, run initq (Qorqtellinittore-examinethe
/etc/inittab
file
.)
ps
aux|
grep
tty
root11370.00.04072228ttyS1Ss+20130:00
/sbin/agetty
/dev/ttyS1
115200vt100-nav
Or execute startttyS1