Add notes for postgres
This commit is contained in:
parent
c409dd4ca1
commit
ba5441d8e0
|
@ -9,6 +9,7 @@
|
||||||
=> gemini://elmau.net/notes/ubuntuserver.gmi • [Ubuntu Server 20.04]
|
=> gemini://elmau.net/notes/ubuntuserver.gmi • [Ubuntu Server 20.04]
|
||||||
=> gemini://elmau.net/notes/nebula.gmi • [Nebula VPN Mesh]
|
=> gemini://elmau.net/notes/nebula.gmi • [Nebula VPN Mesh]
|
||||||
=> gemini://elmau.net/notes/vim.gmi • [Vim]
|
=> gemini://elmau.net/notes/vim.gmi • [Vim]
|
||||||
|
=> gemini://elmau.net/notes/postgres.gmi • [Postgres]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
## Ubuntu Server 20.04
|
## Ubuntu Server 20.04
|
||||||
|
|
||||||
|
|
||||||
|
Agregar un usuario al grupo "sudo".
|
||||||
|
```
|
||||||
|
gpasswd -a USER sudo
|
||||||
|
```
|
||||||
|
|
||||||
Establecer el uso horario
|
Establecer el uso horario
|
||||||
```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/chuletas.gmi Regresar el índice
|
||||||
=> gemini://elmau.net Regresar el inicio
|
=> gemini://elmau.net Regresar el inicio
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue