Merge branch 'fix-pg-instructions' into 'main'

📝 — Use sudo -u postgres in PostgreSQL doc

See merge request framasoft/framaspace/argos!30
This commit is contained in:
Alexis Metaireau 2023-12-21 22:24:42 +00:00
commit 727786aa55

View file

@ -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