That in mind, here is my guide
- Install Postgres:
yum install postgresql-server
- Choose language of Postgres UI:
cd /var/lib/pgsql ; vi data/postgresql.conf
- Set up a "www" account and make a database for said account:
su postgres
# Answer No for all three questions when doing:
createuser www
createdb -O www www
# No, no, and no (no special privileges) - Make the database password protected:
vi /var/lib/pgsql/data/pg_hba.conf
Make all authentication over the network 'password' instead of 'ident' - Apply the changes:
/etc/init.d/postgresql restart
- Let’s give the “www” user a password:
su postgres
And at the prompt...
psqlALTER ROLE www WITH LOGIN;
The semicolon is important.
ALTER ROLE www WITH PASSWORD 'foo';
\q