新增 Database:PostgreSQL
18
Database%EF%BC%9APostgreSQL.md
Normal file
18
Database%EF%BC%9APostgreSQL.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# 安裝 PostgreSQL
|
||||||
|
|
||||||
|
```bash
|
||||||
|
apt update && apt install -y postgresql
|
||||||
|
```
|
||||||
|
|
||||||
|
# 允許外部連線
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nano /etc/postgresql/17/main/pg_hba.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
允許來自 `192.168.230.221` 連線的 `gitea` 使用者可以存取
|
||||||
|
|
||||||
|
```ini
|
||||||
|
...
|
||||||
|
host gitea gitea 192.168.230.221/24 md5
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user