VNX:如何设置在控制台、Windows 或 Linux 中运行 navicli 命令的路径(用户可纠正)
Summary: 本文介绍在 .bash_profile(在 Linux 中)和环境变量(在 Windows 中)中添加路径的过程。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
要在控制台 (Linux) 主机中设置路径:
- 通常,我们必须提供路径,然后才能在控制台 (Linux) 主机中运行任何 navicli 命令。例如:
[nasadmin@vnx5700 ~]$ /nas/sbin/navicli -h spa getagent
- 我们可以导出单个会话的路径或编辑.bas_profile以添加路径,而不是始终提供路径。要导出控制台中的路径,请使用
[nasadmin@vnx5700 ~]$ export PATH=$PATH:/nas/sbin
要编辑.bas_profile,请执行以下作:
- 转到主目录。
[nasadmin@vnx5700 /]$ cd
[nasadmin@vnx5700 ~]$ vi .bash_profile
[nasadmin@vnx5700 ~]$ vi .bash_profile
- 找到行:
PATH=$PATH:$NAS_DB/bin
- 使该行如下所示:
PATH=$PATH:$NAS_DB/bin:/nas/sbin
- 保存文件,注销,然后重新登录。
提醒:在 Linux 上运行时,提供 Linux 主机中 navicli 的安装路径,而不是 /nas/sbin。
要在 Windows 的环境变量中设置路径,请执行以下作:
在 Windows 中安装 Navisphere CLI 软件时,单击“在系统环境路径中包括 Navisphere CLI”复选框。如果在安装时未完成,请按照以下步骤在环境变量中添加路径。
- 在桌面上,右键单击计算机图标。
- 从上下文菜单中选择 Properties。
- 单击高级系统设置链接。
- 单击 Environment Variables。在系统变量部分中,找到
Path环境变量,然后选择它。单击 Edit。如果必须恢复 路径 环境变量不存在,单击New。 - 在编辑系统变量(或新建系统变量)窗口中,指定
Path环境变量。单击 OK。单击“确定”关闭所有剩余窗口。
提醒:该路径应为 Windows 中安装 Navisphere CLI 的文件夹路径。
如果路径已存在,请在添加新路径之前添加分号 (;)。
Windows 10 用户可以搜索“System (Control Panel)”,然后从步骤 3 开始执行作。
完成此作后,您可以从 Windows 命令行中的任何文件夹运行 naviseccli 命令。
如果未设置路径,则必须从安装 Navisphere CLI 的文件夹中运行命令。
Affected Products
VNX1 SeriesProducts
VNX1 Series, VNX2 SeriesArticle Properties
Article Number: 000022607
Article Type: How To
Last Modified: 22 Mar 2022
Version: 4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.