27 lines
775 B
Markdown
27 lines
775 B
Markdown
|
---
|
||
|
tags:
|
||
|
- ubuntu
|
||
|
- PostgreSQL
|
||
|
---
|
||
|
|
||
|
```shell
|
||
|
sudo apt install postgresql postgresql-contrib
|
||
|
createuser someuser
|
||
|
createdb someuser
|
||
|
sudo -u postgres psql
|
||
|
postgres=# \password someuser
|
||
|
postgres=# \q
|
||
|
```
|
||
|
|
||
|
Файл: `/etc/postgresql/<версия>/main/pg_hba.conf`
|
||
|
|
||
|
```
|
||
|
\#local all all peer
|
||
|
local all all md5
|
||
|
sudo service postgresql restart
|
||
|
```
|
||
|
|
||
|
> [!seealso]
|
||
|
> [https://www.digitalocean.com/community/tutorials/how-to-install-postgresql-on-ubuntu-20-04-quickstart-ru](https://www.digitalocean.com/community/tutorials/how-to-install-postgresql-on-ubuntu-20-04-quickstart-ru)
|
||
|
> [https://stackoverflow.com/questions/12720967/postgresql-how-to-change-postgresql-user-password](https://stackoverflow.com/questions/12720967/postgresql-how-to-change-postgresql-user-password)
|