Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/doc/database/postgres/configure-postgres.md

14 lines
858 B
Markdown
Raw Normal View History

2016-06-05 14:14:19 +05:00
Configuring Postgres database
=============================
2016-02-07 19:36:46 +05:00
2016-06-05 14:18:46 +05:00
These are instructions for setting up NNTPChan with Postgres as the data-storage system.
2017-04-04 18:01:43 +05:00
## Configuring Postgres
A user with sufficient privileges to run su is required (hint: you can use root). This command switches to the Postgres user, creates a Postgres role called `srnd`, and prompts for a password. For illustrative purposes, we will use `srnd` as the password.
2016-02-07 19:36:46 +05:00
# su - postgres -c "createuser --pwprompt --createdb --encrypted srnd"
2016-02-07 19:36:46 +05:00
2017-04-04 18:01:43 +05:00
### Important
2016-02-07 19:36:46 +05:00
It's easiest to connect to Postgres using role-based authentication. In this case, our Linux user `srnd` matches up with our Postgres role `srnd`, so role-based authentication can take place. If you're running SRNDv2 as a different user (e.g. `nntpchan`), you will need to create a role that matches that user using the command above.