Install PostgreSQL

In order to use Artisan, you’ll need to download PostgreSQL. This program is used to build Artisan and allows CerTek to perform routine maintenance.

Head to postgresql.org and click on “Download.”

Click on your operating system (for this example, we’re using a Windows computer, so we’ll click on the Windows icon). 

Click on “Download the installer.”

Navigate to the column in the table that has your operating system–in this example, it is Windows x86-64. If you’re not sure how to find your operating system, click here. Click the download icon for the most recent version. 

We currently use version 15:

 

The PostgreSQL installer will start downloading.

A pop-up window will ask if you want the program to make changes to your computer. Select “yes.”

Click “Next” on the PostgreSQL Setup Wizard.

PostgreSQL already created an installation folder for you in your Program Files section, so in most cases, you won’t have to change where PostgreSQL will be installed on your computer. If you want to change where PostgreSQL will be installed, click on the folder button and select a new location. 

 

Otherwise, click “Next.

Leave the components checked, except for the Stack Builder. Hit “Next.”

Now, you’ll need to select where your data will be stored. PostgreSQL automatically created a data folder for you, but if you want to change where that data will be stored, click on the folder button. Otherwise, click “Next.”

Create a password to use to sign into PostgreSQL. Keep this password somewhere secure. Once you’re finished, click “Next.”

 

The installation wizard will automatically select what is known as a “port number.” The server “listens” to this port number. Type in 5435 as the port number. Click “Next” when finished.

Leave the locale set to default, then click “Next.”

The installation wizard will show you a pre-installation summary. Click “Next.”

PostgreSQL is now ready to be installed. Click “Next.”

PostgreSQL will begin installing.

Once you have PostgreSQL installed, you will need to Allow it through Windows Defender Firewall. There are a number of ways to get to the Allowed apps screen. An easy way is to click in the Windows Search Box and type “Allow” as shown in the image.

Choose the program from your results list.

In the Allowed apps screen, click on Change Settings and then Allow another app…

Click on Browse and navigate to the C: Drive and then Program Files and PostgreSQL and then 16 (or whatever version you have) and then bin. Scroll down and select the postgres.exe file and click on Open.

Click on Network types… and choose both public and private and then OK and then click Add.

If you are going to use Artisan from more than one station, you must give it permission. Conveniently, we have just the file for most situations. You will need to click on this link and save the download file pg_hba.conf

Once you have this file in your downloads for example, then copy the file to this location:
C:\Program Files\PostgreSQL\16\data using Windows File Explorer. Make sure you put the file into the data folder and it should ask you to confirm the file replacement. Yes to replace the file.

Next, you’ll need to configure some more settings. Type “Services” into your Windows Search bar and click on the search result.

Scroll down to “PostgreSQL.”

Click on the Restart the service.

Now, Right-click and select “Properties.”

Click on the “Recovery” tab.

Make sure these first few fields are set to “Restart the Service” instead of “Take No Action.”

Click “Apply” and “OK.

Updated on July 27, 2024

Related Articles