我最近在Ubuntu上安装了PostgreSQL和EnterpriseDB包。我可以连接到本地数据库,但我不能配置它,因为我找不到配置文件。我搜索了整个硬盘驱动器,只找到了像pg_hba.conf.sample这样的样本
PostgreSQL .conf文件在哪里?
我最近在Ubuntu上安装了PostgreSQL和EnterpriseDB包。我可以连接到本地数据库,但我不能配置它,因为我找不到配置文件。我搜索了整个硬盘驱动器,只找到了像pg_hba.conf.sample这样的样本
PostgreSQL .conf文件在哪里?
当前回答
在CentOS 7和PostgreSQL 9.4中,它在以下目录中:
/var/lib/pgsql/9.4/data
当我以root用户登录时,我可以看到它。
其他回答
我把它定位在这里:
/var/lib/pgsql/9.6/data/postgresql.conf
在MacOS Mojave上,我使用brew install postgresql来安装,我在这里找到了它
/ usr / local / var / postgres - postgresql上。
我得到了这个使用下面的sql命令引用在这里的响应:
psql -U postgres -c 'SHOW config_file'
Ubuntu 13.04使用软件中心安装:
我的位置是:
/etc/postgresql/9.1/main/postgresql.conf
2022-4-25更新:
地点:/ Library / PostgreSQL / 14 /数据/ postgresql.conf
系统:MacOS Monterey
只是给那些正在寻找这条道路的人……
Run
sudo updatedb
紧随其后的是
locate postgresql.conf