ThingWorx Flow > 安裝與組態 > 配置 ThingWorx Flow > 更新 ThingWorx Flow 資料庫管理員密碼
更新 ThingWorx Flow 資料庫管理員密碼
更新 ThingWorx Flow 資料庫管理員的密碼之後,您必須在 ThingWorx Flow 中更新相同的密碼。欲執行此操作,請完成下列步驟:
1. 在您安裝 ThingWorx Flow 的電腦上以管理員身份啟動指令提示,並執行下列指令以取得 secret 參數的值:
a. pm2 ls
請記下任何 ThingWorx Flow 服務的 ID 值。
b. pm2 env <ID>
,其中 <ID> 是任何 ThingWorx Flow 服務的 ID。例如:flow-api 服務的 ID。
c. 複製 CONFIG_IMAGE 變數的值。這是您需要在步驟 3 與步驟 7 中提供之 secret 參數的值。
secret 參數的值可用來解密信任倉庫。
2. 執行下列指令:
a. cd <ThingWorx Flow 安裝目錄>\cryptography\tw-security-common-nodejs
b. Windows:npm link
Linux:sudo npm link
3. 執行下列指令來解密加密的金鑰檔案:
node dist\PtcOrchKeyFileTool.js --secret <CONFIG_IMAGE 值> --keyfile-location <ThingWorx Flow 安裝目錄>\misc\keyfile-key --plaintext <ThingWorx Flow 安裝目錄>\cryptography\keys.json --encrypted <ThingWorx Flow 安裝目錄>\cryptography\keys.enc decrypt
此指令會在 <ThingWorx Flow 安裝目錄>\cryptography\ 資料夾下建立新的解密 keys.json 檔案。
4. keys.json 檔案中,用更新的 ThingWorx Flow 資料庫管理員密碼修改 MODEL_DB.connection.password 參數。
5. 備份 <ThingWorx Flow 安裝目錄>\cryptography\keys.enc 檔案。
6. 刪除 <ThingWorx Flow 安裝目錄>\cryptography\keys.enc 檔案。
7. 執行下列指令以建立新的加密 keys.enc 檔案:
node dist\PtcOrchKeyFileTool.js --secret <CONFIG_IMAGE 值> --keyfile-location <ThingWorx Flow 安裝目錄>\misc\keyfile-key --plaintext <ThingWorx Flow 安裝目錄>\cryptography\keys.json --encrypted <ThingWorx Flow 安裝目錄>\cryptography\keys.enc encrypt
此指令會在 <ThingWorx Flow 安裝目錄>\cryptography\ 資料夾下建立加密的 keys.enc 檔案。
8. 刪除已解密的 keys.json 檔案。
9. 重新啟動 ThingWorx Flow 服務。
這是否有幫助?