我最近在Ubuntu上安装了PostgreSQL和EnterpriseDB包。我可以连接到本地数据库,但我不能配置它,因为我找不到配置文件。我搜索了整个硬盘驱动器,只找到了像pg_hba.conf.sample这样的样本
PostgreSQL .conf文件在哪里?
我最近在Ubuntu上安装了PostgreSQL和EnterpriseDB包。我可以连接到本地数据库,但我不能配置它,因为我找不到配置文件。我搜索了整个硬盘驱动器,只找到了像pg_hba.conf.sample这样的样本
PostgreSQL .conf文件在哪里?
当前回答
The 30-07-2019
在Windows 10 pro中:
C:\Program Files\PostgreSQL\11\data
其他回答
在linux上的默认位置是:
cd /etc/postgresql/12/main/
12-version 根据安装版本不同,版本可能不同
Win7, version 10位置:
C:\Program Files\PostgreSQL\10\postgresql.conf
Run
sudo updatedb
紧随其后的是
locate postgresql.conf
Fedora 20
$ cd /var/lib/pgsql/data
$ ls -ltr *.conf
-rw-------. 1 postgres postgres 20453 Jan 18 23:22 postgresql.conf
-rw-------. 1 postgres postgres 1636 Jan 18 23:22 pg_ident.conf
-rw-------. 1 postgres postgres 4476 Jan 18 23:22 pg_hba.conf
或者问问你的数据库:
$ psql -U postgres -c 'SHOW config_file'
或者,如果以ubuntu用户登录:
$ sudo -u postgres psql -c 'SHOW config_file'