From 1a5a44fe6a75cb5870f7b43515c26dd731c825ed Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 14 Dec 2023 17:31:11 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20=E2=80=94=20Use=20sudo=20-u=20po?= =?UTF-8?q?stgres=20in=20PostgreSQL=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/installation/postgresql.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/installation/postgresql.md b/docs/installation/postgresql.md index 6ac8127..ec51616 100644 --- a/docs/installation/postgresql.md +++ b/docs/installation/postgresql.md @@ -14,15 +14,10 @@ Here are a few steps for you to install postgresql on your system: sudo apt install postgresql ``` -By default, the `postgres` user has no password and can hence only connect if ran by the `postgres` system user. The following command will assign it: - ```bash -sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" -``` - -```bash -psql postgres -c "CREATE DATABASE argos;" -psql postgres -c "ALTER DATABASE argos SET TIMEZONE TO 'UTC';" +sudo -u postgres createuser -P argos +sudo -u postgres createdb -O argos argos +sudo -u postgres psql -c "ALTER DATABASE argos SET TIMEZONE TO 'UTC';" ``` ## MacOS @@ -32,4 +27,4 @@ brew install postgresql@14 brew services start postgresql@14 createuser argos createdb argos -O argos -``` \ No newline at end of file +```