Re: basic questions: Postgres with yum on CentOS 5.1

Поиск
Список
Период
Сортировка
От Tomasz Ostrowski
Тема Re: basic questions: Postgres with yum on CentOS 5.1
Дата
Msg-id 20080101170522.GA4538@batory.org.pl
обсуждение исходный текст
Ответ на basic questions: Postgres with yum on CentOS 5.1  (Chuck <chuckr@velofish.com>)
Ответы Re: basic questions: Postgres with yum on CentOS 5.1  (Andrew Sullivan <ajs@crankycanuck.ca>)
Список 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@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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Hinting the planner
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: basic questions: Postgres with yum on CentOS 5.1