---
schema_version: "1"
id: 2f4100459aaca110a15c1d934dabf7bf79542c5650ffa839ad06af7ff60b665e
title: 組態檔範例
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/server-linux/config_file_example.md
canonical_url: https://help.tableau.com/current/server-linux/zh-tw/config_file_example.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 0d37bc4fe31a15cbecb143e984bd02b48c843df09528d30531c9afe3327a6e0b
description: Example of a complete JSON configuration file with gatewaySettings and identityStore entities.
---
[跳至主要內容](#main-content)

# 組態檔範例

本文提供了一個完整 JSON 組態檔的範例，其中指定了 gatewaySettings 和 identityStore 實體。此外，設定鍵將閘道超時設定為 900 秒。

您的組態檔看起來將有所不同，具體取決於您需要設定的選項。

安裝過程中可能會設定多個 .json 組態檔。若要為 Tableau Server 中的每個檔案設定值，請為每個組態檔各執行以下命令一次：

`tsm settings import -f path-to-file.json`

設定組態檔之後，執行 [tsm pending-changes apply](https://help.tableau.com/current/server-linux/zh-tw/cli_pending-changes.htm#pending-changes-apply)，應用您設定的所有 .json 檔案中的變更。

{
   "configEntities": {
      "gatewaySettings": {
         "\_type": "gatewaySettingsType",
         "port": 80,
         "publicHost": "localhost",
         "publicPort": 80
      },
      "identityStore": {
         "\_type": "identityStoreType",
         "type": "local",
         "domain": "example.lan",
         "nickname": "EXAMPLE"
      }
    },
     "configKeys": {
        "gateway.timeout": "900"
     }
}

## 實體與鍵

如上面的範例中所示，有兩類設定參數：configEntities 和 configKeys。

**configEntities**

某些類型的設定是透過對應到特定方案（例如身份存儲和閘道設定）的實體集完成的。使用 `tsm settings import -f path-to-file.json` 命令傳遞一組 configEntities 時，TSM 將驗證設定。如果傳遞的值無效，TSM 將提供錯誤。這樣，您將能在設定過程中進行變更，而不會在初始化時或執行時間遇到設定故障。

只能透過在 .json 檔案中包括 configEntities 塊來設定實體。

**重要資訊**：configEntities 中引用的所有檔均必須位於本機電腦上。不要指定 UNC 路徑。

configKeys

實體只涵蓋可設定的一小部分設定值。還有數百個鍵與 .yml 檔案中存儲的參數相對應。Tableau Server 使用這些參數來存儲所有服務的所有設定資訊。

您可以使用 [tsm configuration](https://help.tableau.com/current/server-linux/zh-tw/cli_configuration_tsm.htm) 命令設定單獨的鍵。但在部署過程中，隨 JSON 檔案中的其他設定方案（如上所示）一起設定這些鍵更加方便。

與 configEntities 不同，不會對 configKeys 進行驗證。

**附註：**我們不建議設定 [tsm configuration set 選項](https://help.tableau.com/current/server-linux/zh-tw/cli_configuration-set_tsm.htm)中未記錄的參數。