aboutsummaryrefslogtreecommitdiff
path: root/readme.md
blob: a9cb622d9e726c868a4fd25c5a6501a4dad180b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Install Postgres and Runit service on Alpine Linux

Ideally used in conjunction with my Alpine Linux
playbook, though it shouldn't be hard to adapt it to
other systems.


Securing your postgres installation should go as follows:

```
root@alpine-dev /root # psql -U postgres  
psql (11.5)
Type "help" for help.

postgres=# \password
Enter new password: 
Enter it again: 
postgres=# \q
root@alpine-dev /root # sv down postgres
root@alpine-dev /root # sed -i.bak -e's/trust$/md5/g' /var/postgres/pg_hba.conf
```

Ideally add the password to your `~/.pgpass` if you're going to do
backups from cron or similar. This can be done by defining `postgres_pgpass`
as found  commented out in `defaults/main.yml`