下列字元說明問題:
- 您要在 Linux 伺服器上安裝 NMC 伺服器軟體
- 安裝後 /opt/lgtonmc/bin/nmc_config失敗並顯示 錯誤:命令 /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 伺服器軟體時,可能會出現此問題。在nmc_config腳本文件期間建立的 postgres 使用者無法初始化 NMC 資料庫,因為作業系統 /tmp 目錄上設定的許可權不正確。此目錄應具有所有使用者的完整讀取、寫入、執行許可權。postgres 使用者會在 /tmp 下建立 .lock 檔案,如果無法執行,nmcdb 將無法初始化。
1.以 root 2、a 身
分
登入 NetWorker 伺服器。確認 /tmp 擁有所有使用者的完整讀取、寫入、執行存取:
ls -la / |grep /tmp
範例:
# ls -la / |grep tmp
drwxrwxrwt. 51 根根 8192 11 月 14 日 09:41 tmp
注: 以上反白顯示的值表示所有使用者的完整讀取、寫入、執行許可權。如果您有任何其他許可權設定,則需要變更。
2、b.如果許可權不正確,請執行以下操作來更正:
chmod 777 /tmp
範例:
[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
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以啟動: