Installing a new PostgreSQL database

Have more questions? Submit a request

Download and Install PostgreSQL

  1. Download PostgreSQL Version 18 for Windows x86-64 https://sbp.enterprisedb.com/getfile.jsp?fileid=1259914 
    Note: If your server is on a Mac, the PostgreSQL app is needed in addition (https://postgresapp.com/downloads.html).  Once fully installed, then install the Mac PGAdmin (https://www.pgadmin.org/download/pgadmin-4-macos/).  This will set up the environment properly.

    Note: Support for running an OASIS database on a Linux Server is very limited. We do not have the resident knowledge and awareness of all the environments that a Linux installation can provide.  We can assist with pressing the Create, Start, Run, and Backup functions in PGAdmin, however our instructions cover that and likely we will not need to assist on any remote in this case.

  2. Install PostgreSQL
    • Check your download folder and double click the installer.
    • Click Next.
    • Recommend the default directory.  Click Next.
    • Recommend selecting all components.  Click Next.
    • Choose where you want the data directory to be stored. Click Next.
    • Enter a “oasispg” for the database superuser and Click Next.  

      Note:  You may choose to use a different superuser, however, that specific superuser name will be needed on support calls with Ingen.

    • Recommend using the default port. Click Next.
    • Accept DEFAULT. Click Next.
    • Click Next.
    • Click Next to begin the installation process.
    • Uncheck the option to launch Stack Builder.  Click Finish to complete the installation.

Create and Start the new OASIS database

  1. Run the pgAdmin Program by clicking its icon in your programs.
  2. Enter the superuser name used in Step 2 above.  “oasispg” is the default superuser name recommended.
  3. Right click on Login/Group Roles, then click Create and then select Login/Group Role.
  4. Click on the General Tab name the login "oasis"
  5. Click on the Definition Tab and set the password for the user.  Recommend using "oasis" as the password.
  6. Click on the Privileges Tab and toggle on the options shown in the screenshot below. Click Save.
  7. Right click on Databases and select Create then select Database to create the database.
  8. Click on the General Tab, name the database "oasis" and set the owner to oasis.  Click Save.
  9. Under the database that was just created, right click on Schema and choose Create Schema.  Name it the same as the database with owner as “oasis”.  Click Save.  
  10. Note: It has been found that the schema ends up in public schema.  To date there are no issues with that.

Allow other users on the network to connect.

  1. You will need to find the pg_hba.conf file.  It is located at C:\Program Files\PostgreSQL\<version>\data\pg_hba.conf
  2. Open this file with Admin Privileges in a text editor like Notepad.
  3. Scroll down to # IPv4 local connections section.
  4. Add entries for the IP Addresses you want to allow access to.  For example “host      all        all        127.0.0.1/32    scram-sha-256” will allow access to all local IPs. 

    You can enter specific IP Addresses or ranges.
  5. If you are needing to add remote access you will also need to set “listen_addresses = '*'” in the postgresql.conf file and open port 5432 in the Windows Defender Firewall.

Articles in this section

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.