PostgreSQL installation
Hi all,
Today I will describe the installation process of the PostgreSQL
database on the macOS High Sierra
.
Some of you may ask: why I describe something like that when today we have technology like containerization, which solves for us each step and we don’t need to focus on little technical issues?
In my opinion, containerization is something great and very useful to quickly deliver working solutions,
but when we want to learn what happens under the hood we must go installation process step by step on bare metal.
I got started at the main web page of PostgreSQL
.
I found there information about the available Homebrew package.
Hint: How to install Homebrew you could find on main web page of the project or use my mac-installer project.
When we already have Homebrew installed we could start the PostgreSQL database installation:
1
$ brew install postgresql@<version_number>
To handle database state useful will be Homebrew services:
To Install it I only need run the following command:
1
$ brew services
Start postgresql database:
1
$ brew services run postgresql@<version_number>
Check available users:
1
$ psql postgres
To be able to manage our fresh database useful will be pgAdmin application.
The latest is version 4.
I install it using the following command:
1
$ brew install --cask pgadmin4
When I know available users I can try to connect to the database via pgAdmin app.
It is everything that I have for today.
Everyone is a blacksmith of own fate.
Mateusz.