Add notes for postgres

This commit is contained in:
Mauricio Baeza 2021-08-28 23:13:02 -05:00
parent c409dd4ca1
commit ba5441d8e0
3 changed files with 38 additions and 0 deletions

View File

@ -9,6 +9,7 @@
=> gemini://elmau.net/notes/ubuntuserver.gmi • [Ubuntu Server 20.04]
=> gemini://elmau.net/notes/nebula.gmi • [Nebula VPN Mesh]
=> gemini://elmau.net/notes/vim.gmi • [Vim]
=> gemini://elmau.net/notes/postgres.gmi • [Postgres]

30
source/notes/postgres.gmi Normal file
View File

@ -0,0 +1,30 @@
## Postgres
Instalar
```Instalar
sudo apt install postgresql
```
Configurar acceso
```Configurar acceso
sudo vim /etc/postgresql/12/main/pg_hba.conf
local all postgres trust
local all all scram-sha-256
sudo systemctl restart postgresql
```
Crear roles y bases de datos
```
psql -U postgres
create role ROLE_NAME with login encrypted password 'CONTRA';
create database NAME with owner ROLE_NAME;
```
=> gemini://elmau.net/chuletas.gmi Regresar el índice
=> gemini://elmau.net Regresar el inicio

View File

@ -1,5 +1,11 @@
## Ubuntu Server 20.04
Agregar un usuario al grupo "sudo".
```
gpasswd -a USER sudo
```
Establecer el uso horario
```Establecer el uso horario
@ -112,3 +118,4 @@ sudo vim /etc/security/limits.conf
=> gemini://elmau.net/chuletas.gmi Regresar el índice
=> gemini://elmau.net Regresar el inicio