给esxi编译ipmitool

vmware 的 ESXi服务器是不带包管理系统的,也不带任何编译工具,所以遇到需要安装软件的情况,需要其他Linux环境来编译跨平台二进制文件。
本文主要讲述在CentOS下给ESXi服务器编译ipmitool。

yum -y install autoconf make gcc gcc-c++ glibc glibc-static glibc-devel libstdc++ libstdc++-devel
wget http://nchc.dl.sourceforge.net/project/ipmitool/ipmitool/1.8.15/ipmitool-1.8.15.tar.bz2
tar xvf ipmitool-1.8.15.tar.bz2
cd ipmitool-1.8.15
./configure CFLAGS=-m32 LDFLAGS=-static
make -j8
scp src/ipmitool root@your-esxi-host-ip:/opt/

/opt # ./ipmitool mc info
Device ID : 32
Device Revision : 0
Firmware Revision : 1.50
IPMI Version : 2.0
Manufacturer ID : 674
Manufacturer Name : DELL Inc
Product ID : 256 (0x0100)
Product Name : Unknown (0x100)
Device Available : yes
Provides Device SDRs : yes
Additional Device Support :
Sensor Device
SDR Repository Device
SEL Device
FRU Inventory Device
IPMB Event Receiver
Bridge
Chassis Device
Aux Firmware Rev Info :
0x00
0x18
0x00
0x00

/opt # ./ipmitool lan print

Set in Progress : Set Complete
Auth Type Support : NONE MD2 MD5 PASSWORD
Auth Type Enable : Callback : MD2 MD5
: User : MD2 MD5
: Operator : MD2 MD5
: Admin : MD2 MD5
: OEM :
IP Address Source : Static Address
IP Address : 10.3.0.35
Subnet Mask : 255.255.255.0
MAC Address : e4:5b:dd:dd:dd:dd
SNMP Community String : public
IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
Default Gateway IP : 10.3.0.1
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,4,5,6,7,8,9,10,11,12,13,14
Cipher Suite Priv Max : aaaaaaaaaaaaaaa
: X=Cipher Suite Unused
: c=CALLBACK
: u=USER
: o=OPERATOR
: a=ADMIN
: O=OEM