Do all as the superuser.
apt-get install postgresql postgresql-client postgresql-contrib
# To reset password for postgres user
echo "ALTER USER postgres WITH PASSWORD 'postgres';" | sudo -u postgres psql template1
# reset password for system user
passwd postgres
In bottom of
/etc/postgresql/8.4/main/pg_hba.conf file set as the following:
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database
# super user can access the database using some other method.
# Noninteractive
# access to all databases is required during automatic maintenance
# (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by UNIX sockets
local all postgres ident
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.