Install PostgreSQL on Windows

To install PostgreSQL on Windows:

  1. Download and run the Windows PostgreSQL one click installer. When the wizard prompts you to choose where to install PostgreSQL, point it to the apps subdirectory of your <LABKEY_ROOT>, i.e. C:\labkey\apps\postgresql-10.6\
  2. Keep track of the PostgreSQL Windows Service account name and password. LabKey Server needs to ask for it so that we can pass it along to the PostgreSQL installer.
  3. Keep track of the database superuser name and password. You'll need these to initially create the LabKey database, the LabKey database user, and grant that user the owner role.
  4. We recommend that you install the graphical tool pgAdmin 4.x for easy database administration. Leave the default settings as they are on the "Installation Options" page to include pgAdmin.
  5. Using superuser permissions:
    • Create an empty database.
    • Create a PostgreSQL user named 'labkey'.
    • Grant the owner role to the labkey user over the database.
    • Revoke public permissions from the database.
See the following example PostgreSQL commands:

Connect to the DB server as the Postgres Super User using the psql command:

psql -h <host_Name> -U <Super_username> -d postgres

Issue the following SQL commands to create the user, database and revoke public permissions from the database

create user labkey password 'PASSWORD_HERE' ;
create database "<labkey_db_name>" with owner labkey;
revoke all on database "<labkey_db_name>" from public;
\q

Please read the notes below to forestall any difficulties with the PostgreSQL installation.

Notes

Related Topics

Discussion

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand all collapse all