Configuring PostgreSQL
Change the PostgreSQL user password and encrypt that password.
You can configure the following PostgreSQL configuration variables:
Configuration Variable | Description |
---|---|
TAMR_PERSISTENCE_DB_URL | The URL of the database that you can use with the JDBC driver. In the URL, you can optionally specify ssl=true . This is useful if you are using an external instance of Postgres. For example, you can use: jdbc:postgresql://<host>:<port>/<database>?ssl=true . |
TAMR_PERSISTENCE_DB_USER | The user for the Postgres instance. |
TAMR_PERSISTENCE_DB_PASS | The encrypted password for the Postgres instance. |
For more information, see the Configuration Variable Reference.
Changing the Postgres Username and Password
To change the username and password:
- Use the PostgreSQL ALTER USER command to change the default password for the "tamr" username. For example:
psql
ALTER USER tamr WITH PASSWORD <unencrypted_password>;
\q
- Restart PostgreSQL.
- Set a plain-text value for the configuration variable
TAMR_PERSISTENCE_DB_USER
using the admin tool. See Creating or Updating a Configuration Variable. - Confirm that the current Java is set to Tamr's bundled OpenJDK package, and that the environment variable
JAVA_HOME
is set:
which java
<tamr-home-directory>/openjdk-8u312-b07/bin/java
echo $JAVA_HOME
<tamr-home-directory>/openjdk-8u312-b07
If these settings are not set, run the following commands (assuming bash shell):
export JAVA_HOME=<tamr-home-directory>/openjdk-8u312-b07
export PATH=$JAVA_HOME/bin:$PATH
- Encrypt the database user's password using the utility
encrypt.sh
as follows:
cd <tamr-home-directory>/tamr
./encrypt.sh -AES256
Please enter a password to encrypt:
- Set the configuration variable
TAMR_PERSISTENCE_DB_PASS
to the encrypted output generated in Step 5 using the administration utility. See Setting configuration variables. - Restart Tamr Core and its dependencies. See Restarting Tamr Core.
Updated over 2 years ago