- 论坛徽章:
- 0
|
回复 16# snow888
第一、修改pg_hba.conf
改成象下面这个样子:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 172.16.0.0/16 trust
# IPv6 local connections:
host all all ::1/128 trust
第二、改postgresql.conf
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
#port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
如果有必要的话,再把日志的属性也改了
# This is used when logging to stderr:
redirect_stderr = on# Enable capturing of stderr into log
# files
# (change requires restart)
# These are only used if redirect_stderr is on:
log_directory = '/home/pgsql/log'# Directory where log files are
written
# Can be absolute or relative to PGDATA
log_filename = 'pgsql_%Y%m%d.log' # Log file name pattern.
# Can include strftime() escapes
#log_truncate_on_rotation = off # If on, any existing log file of the same
# name as the new log file will be
# truncated rather than appended to. But
# such truncation only occurs on
# time-driven rotation, not on restarts
# or size-driven rotation. Default is
# off, meaning append to existing files
# in all cases.
就改这些 |
|