---
schema_version: "1"
id: 4a3429ad6f76032cb2def49f5b30dc7e57c2f924a02c9f78cbb3ebc9a430d9b0
title: 配置文件示例
collection: tableau
version: current
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/current/zh-cn/server/config_file_example.md
canonical_url: https://help.tableau.com/current/server/zh-cn/config_file_example.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 0e9229b3b99e83f2ba2349e1c177b7aa149eb5d75f91ccb197fb3bc3d536962d
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/zh-cn/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/zh-cn/cli_configuration_tsm.htm) 命令设置单独的键。但在部署过程中，随 JSON 文件中的其他配置方案（如上所示）一起设置这些键更加方便。

与 configEntities 不同，不会对 configKeys 进行验证。

**注意：**我们不建议设置 [tsm configuration set 选项](https://help.tableau.com/current/server/zh-cn/cli_configuration-set_tsm.htm)中未记录的参数。