Download and Install PostgreSQL
- Download PostgreSQL Version 18 for Windows x86-64 https://sbp.enterprisedb.com/getfile.jsp?fileid=1259914
Note: If your server is on a Mac, ,also download PostgreSQL app (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. - 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.
- Leave the data directory to the default. You will choose another directory for your OASIS database later.
- Enter a “oasispg” for the database superuser and click next. Note: You may choose to use a different one, however, you will need to make sure someone knows it that is on support calls with Ingen.
- Recommend using the default port and click next.
- Accept Default and click next.
- Click next.
- Click next to begin the installation process.
- Click Finish to complete the installation. Also uncheck the option to launch Stack Builder.
- Check your download folder and double click the installer
Create and Start the new OASIS database
- Run the pgAdmin Program by clicking its icon in your programs.
- Enter the “oasispg” used in Step 2 above.
- Create a login by right clicking on Login/Group Roles then Create and then Login/Group Role.
- On the General Tab name the login oasis.
- On the Definition Tab set the password for the user. Recommend oasis.
- On the Priveleges Tab set the rights as follows and click Save
- Now create the database by right clicking on Databases and then selecting Create and Database.
- On the General Tab, name the database oasis and set the owner to oasis. Then click Save.
- Under the database that was just created, right click on Schema and choose Create Schema. Then name it the same as the database with owner as “oasis”. Then click Save. Note: We are finding that the schema ends up in public schema. To date there are no issues with that.
Setup the PostgreSQL database to be seen from outside of localhost
- You will need to find the pg_hba.conf file. It is located at C:\Program Files\PostgreSQL\<version>\data\pg_hba.conf
- Open this file with Admin Privileges in a text editor like Notepad.
- Scroll down to # IPv4 local connections section.
- 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. - 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.
Comments
0 commentsPlease sign in to leave a comment.