desktop-debian/_installs/postgres.sh

22 lines
397 B
Bash
Raw Normal View History

2024-01-04 01:00:22 +01:00
#!/usr/bin/zsh
# Postgres
apt install -y \
postgresql
sudo systemctl start \
postgresql postgresql-client
VER=`psql --version | grep -Eo ' [0-9]+\.[0-9]+ ' | grep -Eo ' [0-9]+' | xargs`
sudo nano /etc/postgresql/$VER/main/pg_hba.conf
# `local all all trust`
sudo systemctl restart postgresql.service
psql -U postgres
```
ALTER USER postgres WITH PASSWORD '2m9tY_KN@5vM%Pn2M#g';
exit
```