Professional Documents
Culture Documents
Installing Thingworx Lab
Installing Thingworx Lab
c
Important User Information
This documentation, whether, illustrative, printed, “online” or electronic (hereinafter “Documentation”) is intended for use only as
a learning aid when using Rockwell Automation approved demonstration hardware, software and firmware. The Documentation
should only be used as a learning tool by qualified professionals.
The variety of uses for the hardware, software and firmware (hereinafter “Products”) described in this Documentation, mandates
that those responsible for the application and use of those Products must satisfy themselves that all necessary steps have been
taken to ensure that each application and actual use meets all performance and safety requirements, including any applicable
laws, regulations, codes and standards in addition to any applicable technical documents.
In no event will Rockwell Automation, Inc., or any of its affiliate or subsidiary companies (hereinafter “Rockwell Automation”) be
responsible or liable for any indirect or consequential damages resulting from the use or application of the Products described in
this Documentation. Rockwell Automation does not assume responsibility or liability for damages of any kind based on the
alleged use of, or reliance on, this Documentation.
No patent liability is assumed by Rockwell Automation with respect to use of information, circuits, equipment, or software
described in the Documentation.
Except as specifically agreed in writing as part of a maintenance or support contract, equipment users are responsible for:task
• properly using, calibrating, operating, monitoring and maintaining all Products consistent with all Rockwell Automation
or third-party provided instructions, warnings, recommendations and documentation;
• ensuring that only properly trained personnel use, operate and maintain the Products at all times;
• staying informed of all Product updates and alerts and implementing all updates and fixes; and
• all other factors affecting the Products that are outside of the direct control of Rockwell Automation.
Reproduction of the contents of the Documentation, in whole or in part, without written permission of Rockwell Automation is
prohibited.
Throughout this manual we use the following notes to make you aware of safety considerations:
Identifies information that is critical for successful application and understanding of the product.
Identifies information about practices or circumstances that can lead to personal injury or death, property
damage, or economic loss. Attentions help you:
• identify a hazard
• avoid a hazard
• recognize the consequence
Labels may be located on or inside the drive to alert people that dangerous voltage may be present.
Labels may be located on or inside the drive to alert people that surfaces may be dangerous temperatures.
Installing ThingWorx
Contents
Before you begin ........................................................................................................................................... 4
About this lab .................................................................................................................................................................................... 4
Tools & Prerequisites ........................................................................................................................................................................ 4
3 of 12
Before you begin
4 of 12
Install Java
2. We need to include the path to the Java runtime in the Environment Variables:
b. Under the [JAVA] and JAVA_HOME heading, copy the path text to the Windows clipboard.
c. Right-click on the Windows start menu and navigate to SystemAdvanced System Settings.
g. In the Variable value field, paste the clipboard text you copied earlier in step b.
5 of 12
Install Apache Tomcat
2. In Windows Explorer, browse to the C:\Program Files\Apache Software Foundation/Tomcat 9.0 folder.
a. Return to the “Thingworx Installation.txt” file and copy the text below the [TOMCAT] heading to the
Windows clipboard.
c. Select the Java tab and scroll to the end of the Java Options text window.
f. Click OK.
6 of 12
Install and Configure PostgreSQL (Windows)
This section describes the installation of PostgreSQL as the persistent storage database for Thingworx.
2. The initial dialogs should be left at their defaults, but you will need to enter and confirm a password for the
postgres superuser account. Enter “postgres” into both text boxes and click Next.
3. Accept the rest of the default settings to complete the installation. Do not launch Stackbuilder.
5. At the pgAdmin master password prompt, enter “pgadmin” and click OK.
6. We will need to set up a special user through which Thingworx will be connected:
b. At the Connect to Server prompt, enter your postgres user password, “postgres”.
e. Select the Definition tab and enter “twadmin” again for the password.
f. Select the Privileges tab and enable the Can login? option.
7 of 12
7. Let’s continue the configuration of PostgreSQL:
a. Open the “Thingworx Installation.txt” file on the Desktop. Under the [POSTGRESQL] and PATH
heading, copy the path text to the Windows clipboard.
b. Right-click on the Windows start menu and navigate to SystemAdvanced System Settings.
d. In the System variables section, highlight the Path variable and click Edit…
e. Click the New button and paste the clipboard text you copied earlier in step a.
f. Click OK, OK, and OK again to complete the process and close the dialogs.
8. We will need to create a folder in the root directory to store the tablespace information.
a. In the “Thingworx Installation.txt” file on the Desktop, under the [POSTGRESQL] and FOLDER
heading, copy the text to the Windows clipboard.
b. In Windows Explorer, browse to the root C:\ drive and create a new folder.
c. Name the folder by pasting the text from the Windows clipboard.
d. Set the Security permissions for this folder to allow the LOCAL_SERVICE Full Control.
e. Set the Security permissions for this folder to allow the NETWORK_SERVICE Full Control.
f. Click OK.
9. The next few steps configure the tables, ports, and database definitions for Thingworx within Postgres
through the use of script files. Fairly common for web applications:
a. From the Windows Start menu, right-click and choose Command Prompt (Admin).
b. Change the directory to the c:\install. (Type “CD\install” <enter>)
c. In the “Thingworx Installation.txt” file on the Desktop, under the [POSTGRESQL] and SCRIPTS
heading, copy the first line of script to the Windows clipboard.
d. Return to the Command Prompt window, paste the text into the C:\install prompt and hit <Enter>.
e. Enter “postgres” at the Password prompt and Press any key to continue.
IMPORTANT: The script should complete with no errors, End Execution and return to the C:\install
command prompt. If you receive any errors or warnings, please notify your instructor.
8 of 12
f. Next, in the “Thingworx Installation.txt” file on the Desktop, under the [POSTGRESQL] and
SCRIPTS heading, copy the second line of script (…Schema…) to the Windows clipboard.
g. Return to the Command Prompt window, paste the text into the C:\install prompt and hit <Enter>.
h. Enter “twadmin” at the Password prompt (4x) and Press any key to continue.
IMPORTANT: The script should complete with no errors, End Execution and return to the C:\install
command prompt. If you receive any errors or warnings, please notify your instructor.
10. Let’s verify that all of the persistent database storage components have been created:
a. Return to the pgAdmin 4 web console (Chrome), right-click on the Server at the top of the tree and choose
Refresh.
b. Drill down into the Databases and verify that you have a thingworx database and (69) tables under the
Schemas.
c. Verify that you have a thingworx folder in the Tablespaces area.
d. In Windows Explorer, verify that there is now an additional folder with sub-components populated within the
C:\ThingworxPostgresqlStorage folder.
9 of 12
Install Thingworx Platform
The purpose of this section is to complete the formal installation of the Thingworx web application.
1. In Windows Explorer, browse to the root C:\ drive and create a new folder named “ThingworxPlatform”.
2. Set the Security permissions to allow BOTH the LOCAL_SERVICE and NETWORK_SERVICE Full Control.
3. Lastly, on the root C:\ drive, create a new folder named “ThingworxStorage”.
Thingworx uses a configuration file to obtain basic settings when launched. The settings are stored in a java script
object notation (JSON) file. PTC provides a file containing initial settings, but we’ve modified this file for our use.
4. In Windows Explorer, browse to the Desktop2020 Updates4-Thingworx folder, copy the “platform-
settings.json” file and paste it into the C:\ThingworxPlatform folder.
5. In order to continue with the web application deployment, we will need to stop the web server. In Windows
Services, locate the “Apache Tomcat9” service. If it is running, right-click on it and choose “Stop”.
6. To deploy the Thingworx web application archive file, in Windows Explorer, browse to the Desktop2020
Updates4-Thingworx folder, copy the “Thingworx.war” file and paste it into the Tomcat installation webapps
folder path below:
8. After a minute or so, open the C:\ThingworxPlatform folder and notice that there is a “LicenseRequext.txt“ file
present. This file contains the PTC Device ID information that should be used to retrieve a valid Thingworx
license manually from the eSupport website.
Without a valid license, Thingworx will run in limited mode until a valid license is provided. Limited mode will
not allow users to persist any licensed entities such as Things, Mashups, Masters, Gadgets, Users, etc.
Thingworx Composer should open, displaying a browse menu along the left side of the screen.
10 of 12
OPTIONAL DEMO: Obtaining a Thingworx License
https://www.ptc.com/en/support/login?returnUrl=%2fen%2fsupport
You will see a confirmation displayed indicating that the request has been submitted. The creation of a license file is processing
but may take a few minutes to complete.
6. You can retrieve the license file once you have received a successful creation email. Within the eSupport portal, the
newly created license file will be available under the License Repository area at the right of the page. Click Download.
7. Back on the Thingworx installation system, Stop the Tomcat service.
8. CRITICAL STEP: The license file MUST be placed into the C:\ThingworxPlatform folder AND renamed as
“license_capability_response.bin”. (spelling is absolutely critical here)
11 of 12
Notes
12 of 12