【iDRAC】突破错误信息壁垒,利用iDRAC提高效率

【iDRAC】突破错误信息壁垒,利用iDRAC提高效率_第1张图片

面对旧服务器上的黄色警示灯,工作人员往往陷入困惑。更糟糕的是,如果该服务器转手多次,缺少root用户密码和IP地址,那么要访问服务器iDRAC就更困难了。但是出现问题的硬件蕴含着重要信息,为了解开这个谜团,我们需要掌握iDRAC的知识,并学习升级iDRAC固件和使用RACADM自定义iDRAC基本设置的技巧。

升级iDRAC固件和自定义基本设置带来了显著的好处,其中包括解决潜在的安全漏洞和故障问题,提高服务器的稳定性和安全性。同时,定制化iDRAC的基本设置可以为我们提供远程访问服务器的便利性,无需前往机房或现场进行实际操作。最重要的是,可以准确地诊断和解决服务器上的问题,最大程度地提高工作效率和服务器的整体性能。

接下来我们将分享具体的步骤和技巧,让您了解如何升级iDRAC固件和安装RACADM并通过其来自定义iDRAC基本设置。这份指南将帮助您解密旧服务器的秘密,挖掘潜藏在其中的无限潜力!

Part A: 通过Linux命令行更新iDRAC版本

在Dell官网找到服务器的最新iDRAC固件并下载,然后上传到对应服务器中。

服务器型号:DELL PowerEdge R720xd
iDRAC版本号:v.2.65.65.65(下载地址)
服务系统信息:Debian 11

【iDRAC】突破错误信息壁垒,利用iDRAC提高效率_第2张图片

root@www:~# chmod +x iDRAC-with-Lifecycle-Controller_Firmware_0GHF4_LN_2.65.65.65_A00.BIN
root@www:~# ./iDRAC-with-Lifecycle-Controller_Firmware_0GHF4_LN_2.65.65.65_A00.BIN

运行结果:

Collecting inventory...
..................................
Running validation...

iDRAC

The version of this Update Package is newer than the currently installed version.
Software application name: iDRAC
Package version: 2.65.65.65
Installed version: 1.57.57.00



Continue? Y/N:y
Executing update...
WARNING: DO NOT STOP THIS PROCESS OR INSTALL OTHER PRODUCTS WHILE UPDATE IS IN PROGRESS.
THESE ACTIONS MAY CAUSE YOUR SYSTEM TO BECOME UNSTABLE!
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Device: iDRAC
  Application: iDRAC
  Update Successful.

The update completed successfully.

Part B:安装iDrac - RACADM

1. 安装需要的软件

root@www:~# apt install gpg libssl-dev libargtable2-0 -y

2. 将存储库密钥添加到apt中

root@www:~# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  1285491434D8786F
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.bSkoZ9PFZ9/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 1285491434D8786F
gpg: key 1285491434D8786F: public key "Dell Inc., PGRE 2012 (PG Release Engineering Build Group 2012) " imported
gpg: Total number processed: 1
gpg:               imported: 1

3. 添加sources.list

root@www:~# echo 'deb http://linux.dell.com/repo/community/openmanage/932/bionic bionic main' | tee -a /etc/apt/sources.list.d/linux.dell.com.sources.list
deb http://linux.dell.com/repo/community/openmanage/932/bionic bionic main

4. 通过输入以下命令,让apt知道新的软件存储库:

root@www:~# apt update

5. 使用 apt 命令安装 iDrac RACADM 软件。

root@www:~# apt install srvadmin-idracadm7 -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  srvadmin-hapi
The following NEW packages will be installed:
  srvadmin-hapi srvadmin-idracadm7
0 upgraded, 2 newly installed, 0 to remove and 144 not upgraded.
Need to get 846 kB of archives.
After this operation, 3,368 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://linux.dell.com/repo/community/openmanage/932/bionic bionic/main amd64 srvadmin-hapi amd64 9.3.2 [293 kB]
Get:2 https://linux.dell.com/repo/community/openmanage/932/bionic bionic/main amd64 srvadmin-idracadm7 all 9.3.2 [553 kB]
Fetched 846 kB in 2min 15s (6,267 B/s)
Selecting previously unselected package srvadmin-hapi.
(Reading database ... 60588 files and directories currently installed.)
Preparing to unpack .../srvadmin-hapi_9.3.2_amd64.deb ...
Unpacking srvadmin-hapi (9.3.2) ...
Selecting previously unselected package srvadmin-idracadm7.
Preparing to unpack .../srvadmin-idracadm7_9.3.2_all.deb ...
Unpacking srvadmin-idracadm7 (9.3.2) ...
Setting up srvadmin-hapi (9.3.2) ...
Setting up srvadmin-idracadm7 (9.3.2) ...

6. 为了方便起见,我们将在/usr/local/bin中创建一个racadm的别名,这样可以在任何用户下简单地通过racadm命令调用。

root@www:~# ln -s /opt/dell/srvadmin/bin/idracadm7 /usr/local/bin/racadm

7. 现在您可以在shell(Linux命令提示符)中直接输入racadm,并将会呈现racadm帮助页面:racadm。

root@www:~# racadm

===============================================================================
RACADM version 9.3.2
Copyright (c) 2003-2019 Dell, Inc.
All Rights Reserved
===============================================================================

RACADM usage syntax:

 racadm <subcommand> <options>

Examples:

 racadm getsysinfo
 racadm getsysinfo -d
 racadm getniccfg
 racadm setniccfg -d
 racadm setniccfg -s 192.168.0.120 255.255.255.0 192.168.0.1
 racadm getconfig -g cfgLanNetworking

Display a list of available subcommands for the RAC:

 racadm help

Display more detailed help for a specific subcommand:

 racadm help <subcommand>

-------------------------------------------------------------------------------

Remote RACADM usage syntax:

 racadm -r <RAC IP address> -u <username> -p <password> <subcommand> <options>
 racadm -r <RAC IP address> -i <subcommand> <options>

 The "-i" option allows the username and password to be entered interactively.

Examples:

 racadm -r 192.168.0.120 -u racuser1 -p aygqt12a getsysinfo
 racadm -r 192.168.0.120 -u racuser2 -p gsdf12o1 getractime
 racadm -r 192.168.0.120 -u racuser3 -p djh2iuha getconfig -g cfgSerial
 racadm -r 192.168.0.120 -u racuser5 -p dsajkhds help getsysinfo

Display a list of available subcommands for the remote RAC:

 racadm -r <RAC IP address> -u <username> -p <password> help

Display more detailed help for a specific subcommand:

 racadm -r <RAC IP address> -u <username> -p <password> help <subcommand>

-------------------------------------------------------------------------------

PART C: 利用racadm来修改iDRAC中的基本设置

1. 修改root密码

root@www:~# racadm set iDRAC.Users.2.Password P@ssw0rd@1234
[Key=iDRAC.Embedded.1#Users.2]
Object value modified successfully

2. 修改时区并启用NTP服务同步时间

root@www:~# racadm set iDRAC.Time.Timezone "Asia/Shanghai"
[Key=iDRAC.Embedded.1#Time.1]
Object value modified successfully

root@www:~# racadm set iDRAC.NTPConfigGroup.NTPEnable Enabled
[Key=iDRAC.Embedded.1#NTPConfigGroup.1]
Object value modified successfully

root@www:~# racadm set iDRAC.NTPConfigGroup.NTP1 192.168.1.5
[Key=iDRAC.Embedded.1#NTPConfigGroup.1]
Object value modified successfully

3. 设置iDRAC的IP地址

root@www:~# racadm set iDRAC.IPv4.DHCPEnable Disabled
[Key=iDRAC.Embedded.1#IPv4.1]
Object value modified successfully

root@www:~# racadm set iDRAC.IPv4.Address 192.168.0.120
[Key=iDRAC.Embedded.1#IPv4.1]
Object value modified successfully

root@www:~# racadm set iDRAC.IPv4.Gateway 192.168.0.1
[Key=iDRAC.Embedded.1#IPv4.1]
Object value modified successfully

root@www:~# racadm set iDRAC.IPv4.Netmask 255.255.255.0
[Key=iDRAC.Embedded.1#IPv4.1]
Object value modified successfully

root@www:~# racadm set iDRAC.IPv4.DNS1 192.168.1.4
[Key=iDRAC.Embedded.1#IPv4.1]
Object value modified successfully

root@www:~# racadm set iDRAC.IPv4.DNS2 192.168.1.5
[Key=iDRAC.Embedded.1#IPv4.1]
Object value modified successfully

root@www:~# racadm get iDRAC.IPv4
[Key=iDRAC.Embedded.1#IPv4.1]
Address=192.168.0.120
DHCPEnable=Disabled
DNS1=192.168.1.4
DNS2=192.168.1.5
DNSFromDHCP=Disabled
Enable=Enabled
Gateway=192.168.0.1
Netmask=255.255.255.0

你可能感兴趣的:(Linux,服务器)