Direct use apt to install:
sudo apt update
sudo apt install postgresql postgresql-contrib
After installation, the connection using the default user postgres postgres default database.
-
Linux users switch to postgres
south something Postgres
-
Login psql
psql
This opens the postgres database.
As can be seen from the above operation, Postgres installation, is created automatically:
- Linux system user postgres
- postgres database user
- postgres database
And when you use the database user login psql, it will automatically open the database with the same name as the user.