以下描述该问题:
- 您要在 Linux 服务器上安装 NMC 服务器软件
- 安装后 /opt/lgtonmc/bin/nmc_config失败,并显示 ERROR:命令 /opt/lgtonmc/bin/gstdbinit -U postgres -n 5432 /nsr/nmc/nmcdb 失败!
完整输出:
# /opt/lgtonmc/bin/nmc_config
NetWorker services on this host are not running. Do you want to start them now [y]?
For optimum security, the NMC server must run the embedded PostgreSQL database server as a non root user. Specify a local user name that will start the database server.
If you specify a user that does not exist, the configuration process will provide you with
the option to create the user account.
Specify the user for the database server [postgres]:
Specify the directory to use for the LGTOnmc database [/nsr/nmc/nmcdb]:
Do you want to migrate the NMC server data from a previous LGTOnmc 8.x.x release [n]?
Specify the host name of the NetWorker Authentication Service host [nw_server_hostname]:
Start the NMC server daemons at end of the configuration [y]?
Creating the installation log in /opt/lgtonmc/logs/install.log.
Performing initialization. Please wait...
ERROR: Command /opt/lgtonmc/bin/gstdbinit -U postgres -n 5432 /nsr/nmc/nmcdb failed!
在没有现有 NMC 数据库 ( /nsr/nmc/nmcdb) 的系统上安装 NMC 服务器软件时,可能会出现此问题。由于在操作系统 /tmp 目录上设置了不正确的权限,在nmc_config脚本期间创建的 postgres 用户无法初始化 NMC 数据库。此目录应具有所有用户的完整读取、写入、执行权限。postgres 用户在 /tmp 下创建 .lock 文件,如果无法执行此操作,nmcdb 将无法初始化。
1.以
root
2,a 身份登录 NetWorker 服务器。确认 /tmp 具有所有用户的完整读取、写入、执行访问权限:
ls -la / |grep /tmp
Example:
# ls -la / |grep tmp
drwxrwxrwt. 51 根根 8192 11 月 14 日 09:41 tmp
注: 上面突出显示的值表示所有用户的完整读取、写入、执行权限。如果您有任何其他权限设置,则需要更改此设置。
2,b.如果权限不正确,请通过运行以下命令更正权限:
chmod 777 /tmp
Example:
[root@nmcserver linux_x86_64]# ls -la / | grep tmp
drwx------. 51 root root 8192 Nov 16 09:18 tmp
[root@nmcserver linux_x86_64]# chmod 777 /tmp
[root@nmcserver linux_x86_64]# ls -la / | grep tmp
drwxrwxrwx. 51 root root 8192 Nov 16 09:18 tmp
3.重命名现有 /nsr/nmc/nmcdb:
mv /nsr/nmc/nmcdb /nsr/nmc/nmcdb.bak
提醒:如果已重命名 nmcdb,则在重命名之前,您将无法从 中提取 NMC 报告。外部身份验证的 NMC 角色配置也将被删除。要恢复 nmcdb,请参阅
NetWorker:如何恢复 NMC 数据库?此操作可在完成本知识库文章中的流程后完成。
4. 重新运行nmc_config:
[root@nmcserver linux_x86_64]# /opt/lgtonmc/bin/nmc_config
NOTE
====
Install has detected the configuration file of a previous lgtonmc
package. Install will attempt to read the configuration parameters
in this file and present them as default values where appropriate.
Please modify any value that is incorrect or needs to be changed.
For optimum security, the NMC server must run the embedded PostgreSQL database server
as a non root user. Specify a local user name that will start the database server.
If you specify a user that does not exist, the configuration process will provide you with
the option to create the user account.
Specify the user for the database server [postgres]:
Specify the directory to use for the LGTOnmc database [/nsr/nmc/nmcdb]:
Do you want to migrate the NMC server data from a previous LGTOnmc 8.x.x release [n]?
Specify the host name of the NetWorker Authentication Service host [nmcserver.lab.emc.com]:
Start the NMC server daemons at end of the configuration [y]?
Creating the installation log in /opt/lgtonmc/logs/install.log.
Performing initialization. Please wait...
done.
The installation completed successfully.
5.确认 GST 服务已启动:
systemctl status gst
6.如果 NMC 服务未运行,则启动它:
systemctl 启动 gst
6.监视 /opt/lgtonmc/logs/gstd.raw以启动: