Install PostgreSQL on Windows

To install PostgreSQL on Windows:

  1. Download and run the Windows PostgreSQL one click installer.
  2. If given the option, install PostgreSQL as a Windows Service. Recent installers install the Windows Service by default.
  3. Keep track of the PostgreSQL Windows Service account name and password. LabKey Server doesn't really care what this password is set to, but we need to ask for it so that we can pass it along to the PostgreSQL installer.
  4. 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.
  5. Select the PL/pgsql procedural language for installation if prompted by the installer.
  6. We recommend that you install the graphical tool pgAdmin (III or 4, as applicable) for easy database administration. Leave the default settings as they are on the "Installation Options" page to include pgAdmin.
  7. If you have chosen to install pgAdminIII, enable the Adminpack contrib module when prompted by the installer.
  8. 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