ThingWorx Flow > ThingWorx Flow 安装和管理 > ThingWorx Flow 8.5 安装概述 > ThingWorx Flow 先决条件 (PostgreSQL)
ThingWorx Flow 先决条件 (PostgreSQL)
以下各节提供了有关安装 ThingWorx Flow 之前需要设置的先决条件的信息:
Windows Server 2016 与 PostgreSQL 的先决条件
具有管理员权限的 Windows Server 2016
ThingWorx Flow 的本地或远程数据库连接。下表提供了需要设置的先决条件:
数据库连接
先决条件
本地数据库连接
PostgreSQL 已安装,且 PostgreSQL/bin 的路径应包括在 PATH 环境变量中。
要安装 ThingWorx Flow 的主机必须有权访问 PostgreSQL Server。
更新了 pg_hba.conf 文件,以允许从 ThingWorx Flow 主机连接至 PostgreSQL。
例如,如果 ThingWorx Flow 与 PostgreSQL 安装在同一主机上,则更新 pg_hba.conf 文件以将密码身份验证方法设置为 md5passwordtrust。但是,不建议设置为 trust
以下是将密码身份验证设置为 md5pg_hba.conf 文件的示例:
$ Edit pg_hba.conf for following:
...
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
有关 pg_hba.conf 文件的详细信息,请参阅 此链接
远程数据库连接
安装与 PostgreSQL 版本兼容的 psql 客户端。
将已安装的 psql 添加到 PATH 环境变量中。您可以按照以下步骤进行操作:
1. 下载 pgadmin4-4.1-x86.exe,位于 https://www.postgresql.org/ftp/pgadmin/pgadmin4/v4.1/windows/
2. 安装 pgadmin 客户端。
3. 更新 PATH 环境变量以添加 pgadmin 客户端的安装路径。
可用于 ThingWorx Flow 的 PostgreSQL 数据库。您可以使用现有 ThingWorx Foundation 数据库,也可以为 ThingWorx Flow 创建一个单独的数据库。在数据库上设置以下配置设置:
将连接限制属性设置为 -1
Allow Connections? 属性设置为 Yes
Encoding 属性设置为 UTF-8.
* 
请确保未将此数据库用于先前的 ThingWorx Flow 安装。
请确保您的数据库用户具有以下设置和权限:
将数据库用户设置为数据库的所有者。
Can login? 属性设置为 Yes
向数据库用户授予对数据库的所有权限。
带有 PostgreSQL 的 Red Hat Enterprise Linux 7.5、7.6、8.0、8.1 或 8.2 的先决条件
* 
请确保您正在受支持的 Red Hat Enterprise Linux 版本上安装 ThingWorx Flow。有关详细信息,请参阅 受支持的操作系统
具有管理员权限的 Red Hat Enterprise Linux (RHEL) 7.5
/etc/selinux/config 文件中,设置 SELINUX=enforcing,然后重新启动计算机。
运行以下命令以启用软件集合:
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 RHSCL (RPMs)'
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 Extra(RPMs)'
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 Optional (RPMs)'
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 RH Common (RPMs)'
yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 Supplementary (RPMs)'
运行以下命令以启用 EPEL 信息库:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum localinstall epel-release-latest-7.noarch.rpm
ThingWorx Flow 的本地或远程数据库连接。下表提供了需要设置的先决条件:
数据库连接
先决条件
本地数据库连接
PostgreSQL 已安装,且 PostgreSQL/bin 的路径应包括在 PATH 环境变量中。
要安装 ThingWorx Flow 的主机必须有权访问 PostgreSQL Server。
更新了 pg_hba.conf 文件,以允许从 ThingWorx Flow 主机连接至 PostgreSQL。
例如,如果 ThingWorx Flow 与 PostgreSQL 安装在同一主机上,则更新 pg_hba.conf 文件以将密码身份验证方法设置为 md5passwordtrust。但是,不建议设置为 trust
以下是将密码身份验证设置为 md5pg_hba.conf 文件的示例:
$ Edit pg_hba.conf for following:
...
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
有关 pg_hba.conf 文件的详细信息,请参阅 此链接
远程数据库连接
安装与 PostgreSQL 版本兼容的 psql 客户端。
可用于 ThingWorx Flow 的 PostgreSQL 数据库。您可以使用现有 ThingWorx Foundation 数据库,也可以为 ThingWorx Flow 创建一个单独的数据库。在数据库上设置以下配置设置:
将连接限制属性设置为 -1
Allow Connections? 属性设置为 Yes
Encoding 属性设置为 UTF-8.
* 
请确保未将此数据库用于先前的 ThingWorx Flow 安装。
请确保您的数据库用户具有以下设置和权限:
将数据库用户设置为数据库的所有者。
Can login? 属性设置为 Yes
向数据库用户授予对数据库的所有权限。
请注意 PosgreSQL 数据库中的以下值:
PostgreSQL IP 地址或主机名称
PostgreSQL 端口
ThingWorx Flow 数据库名称
ThingWorx Flow 数据库登录用户名
ThingWorx Flow 数据库登录密码