Getting Started with ThingWorx > Installing and Upgrading ThingWorx > ThingWorx Foundation Installer
  
ThingWorx Foundation Installer
The ThingWorx Foundation installer files for on-premise installations are posted at support.ptc.com under Download Software > Order or Download Software Updates > ThingWorx Platform > Release 8.4 > ThingWorx PostgreSQL and ThingWorx Mssql.
This installer will do the following:
Install ThingWorx Foundation
Install Tomcat
Set up your database schemas, tables, and users
Help you configure your ThingWorx Foundation license
The ThingWorx Foundation installer is supported on the following operating systems with these database combinations:
Windows 2016 with PostgreSQL 9.6
Windows 2016 with Microsoft SQL Server 2016
Red Hat Enterprise Linux 7.5 with PostgreSQL 9.6
Red Hat Enterprise Linux 7.5 with Microsoft SQL Server 2016
* 
For information about the ThingWorx Flow installation, see Installing ThingWorx Flow.
Hardware Sizing
* 
The following are the minimum requirements; actual sizing depends on the application and your usage scenarios.
Aspect
Value
Notes
Memory
16 GB RAM (Minimum)
Dedicated memory must be allocated to the Java VM.
CPU(s)
4
Virtualized environments may have their own terminology for specifying how many CPUs and cores are being provided. This must be considered when determining if the environment meets the minimum requirements.
Disk Space
100 GB available disk space
This size can accommodate the default application and some initial configuration data.
* 
This does not include the space required for the OS or other prerequisite software.
The total disk space required for any given application depends on the amount of configuration and runtime data that will be maintained. Customers should work with Sales and Field Enablement to estimate space needs according to their application requirements.
Disk Speed
10K RPM or faster
Speed is important if you are storing data on the ThingWorx Platform.
PREREQUISITES
Depending on your operating system and database, you must do the following before running the ThingWorx Foundation installer:
Prerequisites for Windows 2016 with PostgreSQL 9.6
You must have the following:
Windows 2016 with Administrator access
If you want to use local database connections, you must have the following:
PostgreSQL 9.6 installed, and the path to PostgreSQL/bin should be in the PATH environment variable.
Java JDK 1.8 installed
Put java/bin in the PATH environment variable.
Allowed connections to PostgreSQL from the ThingWorx Foundation host by updating pg_hba.conf.
For example, if ThingWorx Foundation is installed on the same host as PostgreSQL, you can update pg_hba.conf to allow connections as follows:
$ Edit pg_hba.conf for following:
...
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
If you want to use remote database connections, you must do the following:
Install the psql client that is compatible with your PostgreSQL 9.6 version.
Add the installed psql to the PATH environment variable. You can follow these steps:
1. Download pgadmin4-4.1-x86.exe from https://www.postgresql.org/ftp/pgadmin/pgadmin4/v4.1/windows/.
2. Install the pgadmin client.
3. Update the PATH environment variable to append to the path where pgadmin client is installed.
Prerequisites for Windows 2016 with Microsoft SQL Server 2016
You must have the following:
Windows 2016 with Administrator access
If you want to use local database connections, you must have the following:
The host on which ThingWorx Foundation is to be installed must have access to Microsoft SQL Server 2016.
A valid Microsoft SQL client (sqlcmd) is installed and is available in the PATH environment variable.
A Microsoft SQL user with Administrator access
Java JDK 1.8 installed
Put java/bin in the PATH environment variable.
If you want to use remote database connections, install sqlcmd and make it available in the PATH environment variable.
Prerequisites for Red Hat Enterprise Linux 7.5
You must have the following:
Red Hat Enterprise Linux (RHEL) 7.5 with Administrator access
Java JDK 1.8 installed
Append the java/bin in the PATH environment variable.
PostgreSQL 9.6 or Microsoft SQL Server 2016 database
Prerequisites for Red Hat Enterprise Linux 7.5 with PostgreSQL 9.6
If you want to use local database connections:
The host on which ThingWorx Foundation is to be installed must have access to a PostgreSQL server version 9.6.
PostgreSQL 9.6 is installed, and the path to PostgreSQL/bin should be in the PATH environment variable.
You have a PostgreSQL user with administrator roles (SUPERUSER, CREATEUSER, or CREATEROLE).
The ThingWorx Foundation installer will create a user for the application.
You allow connections to PostgreSQL from the ThingWorx Foundation host by updating pg_hba.conf.
For example, if ThingWorx Foundation is installed on the same host as PostgreSQL, pg_hba.conf can be updated to allow connections as follows:
$ cat /var/lib/pgsql/9.6/data/pg_hba.conf
...
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
If you want to use remote database connections, install the psql client that is compatible with your PostgreSQL 9.6 version. You can run following command to install the psql client:
yum install rh-postgresql96-postgresql-syspaths
Prerequisites for Red Hat Enterprise Linux 7.5 with Microsoft SQL Server 2016
The host on which ThingWorx Foundation is to be installed must have access to Microsoft SQL Server 2016.
A valid Microsoft SQL client is installed (sqlcmd) and is available in the PATH environment variable.
A Microsoft SQL user with administrator rights.
Install sqlcmd.
For installation instructions, see https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-2017#RHEL.
After installation, run the following:
ln -s /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd
GETTING STARTED
Getting Started with the Windows Installer
1. Log in to the ThingWorx host as Administrator.
2. For PostgreSQL, from support.ptc.com under Download Software > Order or Download Software Updates > ThingWorx Platform > Release 8.4 > ThingWorx PostgreSQL > Most Recent Datecode, download ThingWorx-Platform-Windows-FoundationInstaller-Postgres-8–4–1.
OR
For Microsoft SQL Server, from support.ptc.com under Download Software > Order or Download Software Updates > ThingWorx Platform > Release 8.4 > ThingWorx Mssql > Most Recent Datecode, download ThingWorx-Platform-Windows-FoundationInstaller-Mssql-8–4–1.
3. Extract the build.
4. For PostgreSQL, execute ThingWorxFoundationPostgres-8.4.1-SNAPSHOT.exe.
OR
For Microsoft SQL Server, execute ThingWorxFoundationMSSQL-8.4.1-SNAPSHOT.exe.
5. Step through the installer screens.
6. After ThingWorx Foundation is installed, you will be prompted with the License Configurator.
a. Click Next on the Setup : Configure licensing for ThingworxFoundation for Postgres or Setup : Configure licensing for ThingworxFoundation for Mssql screen.
b. Use License Configurator to connect to the PTC license server or configure ThingWorx Foundation to use the pre-downloaded license.
c. Step through the license screens.
7. Your ThingWorx Foundation installation is complete.
Starting/Stopping ThingWorx Foundation Services on Windows
1. Navigate to Services.msc.
2. Find the ThingWorx Foundation service.
3. Start or stop it.
Getting Started with the Linux Installer
1. Log in to the ThingWorx host as Administrator.
2. For PostgreSQL, from support.ptc.com under Download Software > Order or Download Software Updates > ThingWorx Platform > Release 8.4 > ThingWorx PostgreSQL > Most Recent Datecode, download ThingWorx-Platform-Linux-FoundationInstaller-Postgres-8–4–1.
OR
For Microsoft SQL Server, from support.ptc.com under Download Software > Order or Download Software Updates > ThingWorx Platform > Release 8.4 > ThingWorx Mssql > Most Recent Datecode, download ThingWorx-Platform-Linux-FoundationInstaller-Mssql-8–4–1.
3. Extract the build.
4. For PostgreSQL, execute ThingWorxFoundationPostgres-8.4.1-SNAPSHOT.run.
OR
For Microsoft SQL Server, execute ThingWorxFoundationMSSQL-8.4.1-SNAPSHOT.run.
5. Step through the installer screens.
6. After ThingWorx Foundation is installed, you will be prompted with the License Configurator.
a. Click Next on the Setup : Configure licensing for ThingworxFoundation for Postgres screen or Setup : Configure licensing for ThingworxFoundation for Mssql screen.
b. Use License Configurator to connect to the PTC license server or configure ThingWorx Foundation to use the pre-downloaded license.
c. Step through the license screens.
7. Your ThingWorx Foundation installation is complete and you can now use ThingWorx Foundation.
Starting/Stopping ThingWorx Foundation Services on Linux
1. Log in to the ThingWorx host as a user with administrative rights (execute sudo).
2. To start the services, enter sudo systemctl start ThingWorx-Foundation.
3. To stop the services, enter sudo systemctl disable ThingWorx-Foundation.
Connecting to the ThingWorx Foundation Server
1. Access the ThingWorx Foundation URL.
For example: http://<hostname>:<port>/Thingworx/Composer. Or, if SSL is enabled: https://<hostname>:<port>/Thingworx/Composer.
* 
The ThingWorx Foundation URL will be different depending on your configuration of SSL/non-SSL and ports used during setup.
2. Provide user credentials.
* 
The username is Administrator and the password is what was entered during setup.
Installer Log Files
Installation
Linux
Windows
ThingWorx Foundation
Installation logs:
${installdir}/ThingWorx${dbtype}_install.log
/opt/ThingWorxPostgres-8.4.1-SNAPSHOT/ThingWorxPostgres_install.log
Running logs:
${installdir}/ThingworxStorage/logs/
/opt/ThingWorxPostgres-8.4.1-SNAPSHOT/ThingworxStorage/logs/
Installation logs:
${installdir}\ThingWorx${dbtype}_install.log
C:\Program Files (x86)\ThingWorxPostgres-8.4.1-SNAPSHOT\ThingWorxPostgres_install.log
Running logs:
${installdir}\ThingworxStorage\logs\
C:\Program Files (x86)\ThingWorxPostgres-8.4.1-SNAPSHOT\ThingworxStorage\logs\
UNINSTALLING
Uninstalling a ThingWorx Foundation Installer-based Installation on Windows
1. Navigate to the twx-foundation installation location.
2. For PostgreSQL, execute ThingWorxFoundationPostgres_uninstall.exe.
OR
For Microsoft SQL Server, execute ThingWorxFoundationMSSQL_uninstall.exe
3. When prompted, click OK to confirm that you want to continue with the un-installation.
4. When the un-installation is complete, the setup is deleted. Uninstall logs are saved to the installation location.
Uninstalling a ThingWorx Foundation Installer-based Installation on Linux
1. Navigate to the twx-foundation installation location.
2. For PostgreSQL, execute ThingWorxFoundationPostgres_uninstall.dat.
OR
For Microsoft SQL Server, execute ThingWorxFoundationMSSQL_uninstall.dat
3. When prompted, click OK to confirm that you want to continue with the un-installation.
4. When the un-installation is complete, the setup is deleted. Uninstall logs are saved to the installation location.
Deleting the ThingWorx Database from PostgreSQL
1. From the command line in either Windows or Linux, open a connection to the PostgreSQL database.
For example, enter psql -U admin -h dbhost.
2. If you are using the default database name, execute the DROP DATABASE thingworx; command.
Or, if you customized the database name, execute the DROP DATABASE <your database name>; command.
Deleting the ThingWorx Database from Microsoft SQL
1. From the command line in either Windows or Linux, open a connection to the Microsoft SQL database.
For example, enter sqlcmd -U admin -s ‘dbhost\dbservicename,port’.
2. If you are using the default database name, execute the DROP DATABASE thingworx; GO; command.
Or, if you customized the database name, execute the DROP DATABASE <your database name>; GO; command.