Re: basic questions: Postgres with yum on CentOS 5.1

From: Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl>
To: Chuck <chuckr(at)velofish(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: basic questions: Postgres with yum on CentOS 5.1
Date: 2008-01-01 17:05:32
Message-ID: 20080101170522.GA4538@batory.org.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 31 Dec 2007, Chuck wrote:

> I asked the web host to make sure that Postgres is installed. They did this
> by running the following command:
> yum -y install postgre postgre-server postgre-devel

I think the proper command was:
yum -y install postgresql postgresql-server postgresql-devel

> Upgrade to PostgreSQL 8.2.5?

No. As you're not a unix admin I'd recommend staying with
distribution provided postgresql version. Otherwise you'd have to
upgrade it manually, stay alert of security vulnerabilities etc.
Distribution provided Postgresql would be updated automatically, just
like any other program. Just make sure automatic updates are turned
on.

> 1. Using root, should I change the password for the postgre user with
> 'passwd postgre' (so that I know the password)? Do I need to know the
> password?

No. This user should not have a password, it should be blocked. By
default it is created blocked so don't touch it.

The user is "postgres" not "postgre", by the way.

> 2. Do I need to manually create the data directory with postgre as the
> owner before running initdb?

No. The init script will do this for you. Just use
service postgresql start
but first you have to have locale properly set:

> 3. To ensure that the databases I create use UTF-8 do I merely use
> the '-E UTF8' option with initdb?
> [chuck(at)vs191 ~]$ locale
> LC_CTYPE="POSIX"
> LC_COLLATE="POSIX"

This is bad. Make sure you have
LANG="en_US.UTF-8"
set in a file "/etc/sysconfig/i18n" and reboot.

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
Winnie the Pooh

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2008-01-01 17:29:05 Re: basic questions: Postgres with yum on CentOS 5.1
Previous Message Scott Marlowe 2008-01-01 16:45:00 Re: Hinting the planner