3. Set up the database for ThingWorx
All ThingWorx database setup steps should be performed on all PostgreSQL nodes.
Step 0
Download ThingWorx install package.
Download the ThingWorx for PostgreSQL install package and extract its content to the /db/install folder.
Step 1
Create twadmin role.
Step 2
Inside psql, using following command to create the twadmin role. Modify the password to meet your security requirements.
psql> create user twadmin with password 'trUf6yuz2?_Gub';
psql> alter role twadmin with createdb;
Step 3
Create the database.
Ensure /db/thingworx has been created and the postgres user is the owner of this folder.
Change directory to /db/install execute the following:
./thingworxPostgresDBSetup.sh -a postgres -u twadmin -l /db/thingworx
To verify this installation:
psql -d thingworx
Step 4
Grant privileges to twadmin.
grant all privileges on database thingworx to twadmin;
Step 5
Create Schema.
Step 6
Verify Schema.
psql -d thingworx -U twadmin
This should return results similar to the following:
Was this helpful?