从更新开始... ...
sudo apt-get update
安装Postgresql
sudo apt-get install postgresql postgresql-contrib
设置Postgresql的用户名和密码
sudo -u postgres psql -c "ALTER ROLE postgres WITH 你的密码A ''"
sudo -u postgres psql -c "CREATE USER twadmin WITH 你的密码B '';"
启用PostgreSQL 监听全部连接:
在postgresql.conf 文件中,更新listen_adresses为:listen_addresses = '*'
检查postgresql.conf文件:/etc/postgresql/12/main/postgresql.conf 【我默认安装的是Postgresql 12】
.........监听地址和端口:localhost 和 5432
检查postgresql.conf文件:/etc/postgresql/12/main/pg_hba.conf【我默认安装的是Postgresql 12】
.........地址为 127.0.0.1/32 的数据库“全部”,方法设置为 md5
------------------接下来需要配置Thingworx包含的Postgresql部分---------------------
从获取的ThingWorx-Platform-Postgres安装包中,解压看到install目录;
sudo unzip MED-61111-CD-085_SP11_ThingWorx-Platform-Postgres-8-5-11.zip
创建postgresql对应thingworx的文件夹:
sudo mkdir /ThingworxPostgresqlStorage
sudo chown postgres:postgres /ThingworxPostgresqlStorage
sudo chmod 755 /ThingworxPostgresqlStorage
进入ThingWorx-Platform-Postgres解压包的install目录:
cd install
设置 PostgreSQL 数据库和表空间:
sudo sh thingworxPostgresDBSetup.sh -a postgres -u tadmin-l /ThingworxPostgresqlStorage
将公共架构设置在安装于本地主机的 PostgreSQL 实例的数据库下:
sudo sh thingworxPostgresSchemaSetup.sh
...............................End............................