服务器cmd升级系统命令,02-软件升级操作指导(命令行版)

本文档详细介绍了通过命令行升级H3C WAC380-30设备软件的步骤,包括保存配置、检查存储空间、使用TFTP或FTP协议下载升级文件、设置启动文件、重启设备等。在升级过程中,需要确保设备与文件服务器的路由可达,并正确配置TFTP/FTP服务器。升级完成后,通过设备的启动文件版本信息验证升级成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

879951c6c0664b7b0933b20ac1fb7f06.png

·     如果本地没有需要的设备版本文件,请到官网“产品支持与服务/文档与软件/软件下载/无线”路径下载对应产品和版本的AC软件压缩包。

·     本文档的软件升级显示信息与设备型号、软件版本相关,可能会略有差别,请以设备实际显示信息为准。

1.1  命令行软件升级方式简介

升级方式

说明

·     需要重启设备来实现设备软件的升级。

·     升级设备软件时会导致当前业务中断。

可在设备无法正常启动时升级设备软件。

在升级设备启动文件前,请完成如下准备工作:

·     配置设备与文件服务器路由可达。

·     开启文件服务器的TFTP/FTP Server功能。

·     通过配置终端登录到设备的命令行配置界面中。

·     将设备的升级启动文件拷贝到文件服务器上,并正确设置TFTP/FTP Server的访问路径。

efbbcce1642ad7fda25ab527498fdfed.png

升级设备的启动文件后,需要重新启动设备,在重启过程完成前,设备的各项业务功能将不可用。

图1-1 设备的升级环境

fe99dec1230ed17b68ead3b3ef28b748.png

本手册以H3C WAC380-30为例介绍Comware V7操作系统的软件升级操作。

1.3.1  保存当前配置并查看存储介质剩余空间

(1)     在任意视图下,执行save命令保存设备当前配置信息:

save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

(2)     在用户视图下,执行dir命令查看设备当前的文件系统,确认启动文件及配置文件名,以及存储介质的剩余空间,保证存储介质有足够空间放入新的启动文件:

dir

Directory of flash:

0 drw-           - Jan 01 1980 00:00:00   diagfile

1 drw-           - Jan 01 1980 00:00:00   dpi

2 -rw-         735 Jan 01 1980 00:00:00   hostkey

3 drw-           - Jan 01 1980 00:00:00   icon

4 -rw-         393 Jun 13 2077 09:08:33   ifindex.dat

5 -rw-           0 Jan 01 1980 00:00:00   lauth.dat

6 drw-           - Jan 01 1980 00:00:00   license

7 drw-           - Jan 01 1980 00:00:00   logfile

8 drw-           - Jan 01 1980 00:00:00   pki

9 drw-           - Jan 01 1980 00:00:00   seclog

10 -rw-         591 Jan 01 1980 00:00:00   serverkey

11 -rw-        9388 Jun 13 2077 09:08:34   startup.cfg

12 -rw-      137234 Jun 13 2077 09:08:34   startup.mdb

13 -rw-         309 Jan 01 1980 00:00:00   test.py

14 -rw-   103904256 Jan 01 1980 00:00:00   boot.bin

15 -rw-    64708608 Jan 01 1980 00:00:00   system.bin

983040 KB total (485384 KB free)

存储介质剩余存储空间约为485 MB(485384 KB)。

用户可以将设备做为客户端,通过TFTP或FTP协议,将升级软件包下载到设备的存储介质上:

1. 使用TFTP协议

在用户视图下,执行tftp get命令将升级软件包wac380_30.ipe下载到设备的Flash卡中:

tftp 192.168.0.1 get wac380_30.ipe

Press CTRL+C to abort.

% Total    % Received % Xferd

Average Speed   Time    Time     Time  Current

Dload  Upload   Total   Spent    Left  Speed

100  160M  100  160M    0     0   816k

0  0:03:21  0:03:21 --:--:--  807k

2. 使用FTP协议

(1)     在用户视图下,执行ftp命令登录FTP服务器,并输入用户名和密码:

ftp 192.168.0.1

Press CTRL+C to abort.

Connected to 192.168.0.1

(192.168.0.1).

220 Browser Ftp Server.

User (192.168.0.1:(none)): admin

331 Password required for this user.

Password:

230 User Logged In.

Remote system type is UNIX.

Using binary mode to transfer files.

(2)     在FTP客户端视图下,执行get命令将启动文件wac380_30.ipe下载到设备的Flash卡中:

get wac380_30.ipe

wac380_30.ipe already exists.

Overwrite it? [Y/N]:y

227 Entering passive mode

(192,168,0,1,5,20)

150

"D:\FTP\wac380_30.ipe" file ready to send (175777792 bytes) in IMAGE

/ Binary mode

......................................................................................

226 Transfer finished successfully.

175777792 bytes received in 123.448 seconds (1.36 Mbytes/s)

(3)     在FTP客户端视图下,执行quit命令,返回到用户视图:

quit

221 Service closing control connection

(1)     在用户视图下,执行boot-loader命令设置设备下次启动使用的启动文件为wac380_30.ipe,并指定启动文件类型为main:

boot-loader file flash:/wac380_30.ipe main

Verifying the file flash:/wac380_30.ipe on the device.........Done.

H3C WAC380-30 images in IPE:

boot.bin

system.bin

ap.bin

This command will set the main startup software images. Please do not reboot the device during the upgrade.

Continue? [Y/N]:y

Add images to the device.

File flash:/boot.bin already exists on the device.

File flash:/system.bin already exists on the device.

Overwrite the existing files?

[Y/N]:y

Decompressing file boot.bin to flash:/boot.bin..........Done.

Decompressing file system.bin to flash:/system.bin........................................................................................Done.

Decompressing file ap.bin to flash:/ap.bin.............................................................Done.

Verifying the file flash:/boot.bin on the device...Done.

Verifying the file flash:/system.bin on the device......................Done.

Verifying the file flash:/ap.bin on the device................Done.

The images that have passed all examinations will be used as the main startup software images at the next reboot on the device.

Decompression completed.

You are recommended to delete the .ipe file after you set startup software images for all slots.

Do you want to delete flash:/wac380_30.ipe now? [Y/N]:y

(2)     执行display boot-loader命令查看设备的启动程序文件信息:

display boot-loader

1.3.4  重启设备

(1)     在用户视图下,执行reboot命令重启设备:

reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

System is starting...

(2)     设备重启后,通过display version命令查看设备的启动文件版本信息是否与升级的启动文件一致。

display version

H3C Comware Software, Version 7.1.064, ESS 5426

1.4  通过BootWare菜单升级启动文件

917ef679eaef6cd75f2921a0b84c59df.png

·     在软件升级时,配置文件将自动清空,请备份当前版本对应的配置文件,等系统升级后根据备份文件重新进行配置。

·     通过BootWare菜单的以太网接口升级启动文件时,设备的以太网接口选择规则为:管理接口>WAN接口>LAN 1接口,即设备优先使用管理接口下载启动文件,无管理接口时优先使用WAN接口下载启动文件,上述两个接口都没有时使用LAN 1接口下载启动文件。

(1)     将Comware V7上当前运行的配置保存至设备存储介质。

save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists,

overwrite? [Y/N]:y

Validating file. Please wait...

Configuration is saved to device successfully.

(2)     将配置文件备份到FTP/TFTP SERVER上(以TFTP Server为例)。

tftp 192.168.0.1 put startup.cfg

Press CTRL+C to abort.

% Total    % Received %

Xferd  Average Speed   Time    Time     Time  Current

Dload  Upload   Total   Spent    Left  Speed

100  4030    0     0  100

4030      0  10232 --:--:-- --:--:-- --:--:-- 26688

1.4.2  进入BootWare菜单

设备上电和重新启动的过程中,在配置终端的屏幕上首先将显示:

System is starting...

Press Ctrl+D to access BASIC-BOOTWARE MENU

Booting Normal Extended BootWare

****************************************************************************

*

*

*                   H3C WAC380-30 BootWare, Version 1.10                   *

*                                                                          *

****************************************************************************

Copyright (c) 2004-2019 New H3C Technologies Co., Ltd.

Compiled Date       : Jul 18 2019

CPU Type            : 1333MHz Multi-core Processor

Memory Type         : DDR3 SDRAM

Memory Size         : 1024MB

Memory Speed        : 667MHz

Flash Size          : 1024MB

CPLD Version        : 002

PCB Version         : Ver.A

BootWare Validating...

Press Ctrl+B to access EXTENDED-BOOTWARE MENU...

当出现“Press Ctrl+B to access EXTENDED-BOOTWARE MENU...”时,键入,系统进入BootWare主菜单:

Password recovery capability is enabled.

Note: The current operating device isflash

Enter < Storage Device Operation > to select device.

======================================================

|<1> Boot System                                                           |

|<2> Enter Serial SubMenu                                                  |

|<3> Enter Ethernet SubMenu                                               |

|<4> File Control                                                          |

|<5> Restore to Factory Default Configuration                              |

|<6> Skip Current System Configuration                                     |

|<7> BootWare Operation Menu                                               |

|<8> SkipAuthentication forConsoleLogin

|

|<9> Storage Device Operation                                              |

|<0> Reboot                                    |

============================================================================

Ctrl+Z: Access EXTENDED ASSISTANT MENU

Ctrl+F: Format File System

Ctrl+C: Display Copyright

Enter your choice(0-9):

0bff0a58e2033ce90b0a9586e42e95b1.png

·     为了阅读和便于理解,如果不做特殊说明,本菜单都将称为BootWare主菜单。

·     以上显示信息与设备实际情况相关,可能会略有差别。

(1)     在BootWare主菜单下键入<3>并回车,可以进入以太网操作子菜单,系统显示如下:

====================================================

|Note:the operating device is flash

|

|<1> Download Image Program To SDRAM And Run                               |

|<2> Update Main Image File                                                |

|<3> Update Backup Image File                                              |

|<4> Download Files(*.*)                                                   |

|<5> Modify Ethernet Parameter                                             |

|<0> Exit To Main Menu                                                     |

|                    |

============================================================================

Enter your choice(0-5):

以太网操作子菜单中各选项解释如下:

菜单项

说明

<1> Download Application Program To SDRAM And Run

下载启动文件到内存并启动

<2> Update Main Image File

升级主启动文件

<3> Update Backup Image File

升级备份启动文件

<4> Download Files(*.*)

下载文件到存储介质

<5> Modify Ethernet Parameter

修改以太网接口参数

<0> Exit To Main Menu

返回BootWare主菜单

(2)     在以太网操作子菜单,键入<5>并回车就可以进入以太网参数设置页面:

==================================================

|Note:       '.' = Clear field.                                           |

|            '-' = Go to previous field.                                  |

|          Ctrl+D = Quit.                                                 |

==========================================================================

Protocol (FTP or TFTP) :ftp

Load File Name         :wac380_30.ipe

:

Target File Name       :wac380_30.ipe

:

Server IP Address      :192.168.0.1

Local IP Address

:192.168.0.100

Subnet Mask

:255.255.255.0

Gateway IP Address

:0.0.0.0

FTP User Name

:user001

FTP User Password

:********

显示

说明

'.' = Clear field

快捷键:“.”表示清除当前输入

'-' = Go to previous field

快捷键:“-”表示返回到前一个参数域

Ctrl+D = Quit

快捷键:表示退出参数配置界面

Protocol (FTP or TFTP)

使用的传输协议,可以为FTP或者TFTP

Load File Name

下载文件名,要与下载的实际文件名一致

Target File Name

存储的目标文件名。缺省情况下与服务器端文件名一致

Server IP Address

TFTP/FTP服务器的IP地址

Local IP Address

本地IP地址,为TFTP/FTP客户端设置的IP地址

Subnet Mask

本地IP地址的子网掩码

Gateway IP Address

网关IP地址。当与服务器不在同一网段时需要配置网关地址

FTP User Name

FTP用户名,传输协议为TFTP时,无此选项

FTP User Password

FTP用户密码,传输协议为TFTP时,无此选项

(3)     在以太网操作子菜单键入<2>并回车升级主启动文件:

Loading.....................................................................

............................................................................

............................................................................

.........................................Done.

168620032 bytes downloaded!

The file is exist,will you overwrite it? [Y/N]Y

Image file boot.bin is self-decompressing...

Saving file flash:/boot.bin

...........................Done.

Image file system.bin is self-decompressing...

Saving file flash:/system.bin

.........................Done.

Image file ap.bin is self-decompressing...

Saving file flash:/ap.bin

..................... ..... .Done

====================================================

|Note:the operating device is flash

|

|<1> Download Image Program To SDRAM And Run                               |

|<2> Update Main Image File                                                |

|<3> Update Backup Image File                                              |

|<4> Download Files(*.*)                                                   |

|<5> Modify Ethernet Parameter                                             |

|<0> Exit To Main Menu                                                     |

|                    |

============================================================================

Enter your choice(0-5):

(4)     选择<0>并回车,返回BootWare主菜单:

Enter your choice(0-5): 0

=====================================================

|<1> Boot System                                                            |

|<2> Enter Serial SubMenu                                                   |

|<3> Enter Ethernet SubMenu

|

|<4> File Control                                                           |

|<5> Modify BootWare Password                                               |

|<6> Skip Current System Configuration                                      |

|<7> BootWare Operation Menu                                                |

|<8> Skip Authentication for Console Login                                  |

|<9> Storage Device Operation                                               |

|<0> Reboot                                                                 |

============================================================================

Ctrl+Z: Access EXTENDED ASSISTANT MENU

Ctrl+F: Format File System

Ctrl+C: Display Copyright

Enter your choice(0-9):

(5)     选择<1>并回车,引导系统:

Enter your choice(0-9): 1

Loading the main image files...

Loading file flash:/system.bin...........................Done.

Loading file flash:/boot.bin..............Done.

Image file flash:/boot.bin is self-decompressing..............Done.

System image is starting...

Cryptographic algorithms tests passed.

Line con0 is available.

Press ENTER to get started.

(6)     设备正常启动后,通过display version命令查看设备的启动文件版本信息是否与升级的启动文件一致。

display version

H3C Comware Software, Version 7.1.064, ESS 5426

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值