Skip to content
0
/ NAS/PostgreSQL
6/1/2026
1m
AI 摘要

群晖套件 PostgreSQL:改 pg_hba.conf/postgresql.conf、重启与命令行连库查表。

PostgreSQL

从套件市场安装

修改配置

$ vim /volume1/@appstore/postgresql/share/data/pg_hba.conf # 修改常用于,允许外部 IP 连接
$ vim /volume1/@appstore/postgresql/share/data/postgresql.conf # 修改常用于,允许监听所有的 PD

重启

$ synopkg start postgresql

命令行

$ su - postgres
$ psql
psql (11.11)
Type "help" for help.

$ \d
           List of relations
 Schema |    Name    | Type  |  Owner
--------+------------+-------+----------
 public | test_table | table | postgres

Released under the MIT License.