TIBCO Spotfire® Server and Environment - Installation and Administration

Setting up the Spotfire database (PostgreSQL)

If you are running PostgreSQL, follow these steps to set up the Spotfire database before you run the Spotfire Server installer.

Before you begin

  • You have downloaded and unzipped the Spotfire Server installation kit from the TIBCO eDelivery web site; for instructions, see Downloading installation software.
  • The following settings must be configured on the PostgreSQL server:
    • TCP/IP communication listening on a port (the default is 5432).
    • The command line database tool (psql) must be installed.

Procedure

  1. Copy the <installation files dir>/scripts/postgres_install directory to a location where you can edit it.
  2. Go to the postgres_install directory, and open the create_databases script that corresponds to your platform in a text editor:
    • Windows: create_databases.bat
    • Linux: create_databases.sh
  3. Edit the create_databases script by providing the appropriate database server details.
    Table 1. Definitions of the variables in create_databases
    Variable Description
    DB_HOST Replace <DB_HOST> with the name of the server running the PostgreSQL instance.
    DBADMIN_NAME Name of a user with PostgreSQL database administrator privileges, usually "postgres".
    DBADMIN_PASSWORD Password of the DBADMIN_NAME user.
    SERVERDB_NAME Name of the Spotfire database that will be created; spotfire_server is the default.
    SERVERDB_USER Name of the user that will be created to set up the Spotfire database.
    SERVERDB_PASSWORD Password for SERVERDB_USER.
    PSQL_PATH The path to the bin directory of the PostgreSQL command line tools.
    Note: According to the PostgreSQL standards, it is recommended to use lower case characters for the SERVERDB_NAME and the SERVERDB_USER parameters.
    Example
    This is what the create_databases.bat file section might look like after modification:
    rem Set this variable to the hostname of the PostgreSQL instance
    set DB_HOST=dbsrv.example.com
    
    rem Set these variables to the username and password of a database user
    rem with permissions to create users and databases
    set DBADMIN_NAME=postgres
    set DBADMIN_PASSWORD=admin123
    
    rem Set these variables to the name of the database to be created for the TIBCO Spotfire
    rem Server, and the user to be created for TIBCO Spotfire Server to access the database.
    rem Note that the password is entered here in plain text, you might want to delete
    rem any sensitive information once the script has been run.
    set SERVERDB_NAME=spotfire_server
    set SERVERDB_USER=spotfire_db
    set SERVERDB_PASSWORD=spotfire_db123
    
    rem Set this variable to the bin directory of the PostgreSQL installation
    rem where psql.exe can be found
    set PSQL_PATH=C:\Program Files\PostgreSQL\12.1\bin
  4. Save the file and close the text editor.
  5. Open a command line as an administrator and go to the directory where you placed the scripts.
  6. Type create_databases.bat and press Enter.
    If the parameters are correct, text that is similar to the following text is displayed at the command line:

    Note: The log.txt file is created in the same directory as the create_databases file. Examine this file to verify that no errors occurred and retain the log for future reference. The log file will contain notices about which type is used for certain fields, which is the expected behavior.
    Note: Because the scripts contain sensitive information, it is good practice to remove them after your Spotfire environment has been installed.

What to do next

Install Spotfire Server