| From: | Chuck <chuckr(at)velofish(dot)com> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | basic questions: Postgres with yum on CentOS 5.1 | 
| Date: | 2007-12-31 22:39:02 | 
| Message-ID: | p0623093ec39f040e7c3f@[192.168.1.50] | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Hello,
About a week ago I got a VPS from a web host. The VPS is running 
CentOS 5.1. I'm a software developer, new to Postgres and only have 
basic Unix admin skills.
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
They told that the command downloads and installs the RPMs from the 
CentOS 5.1 repo. And they believe it would have added a postgre 
user without login capabilities. When I attempted to 'adduser 
postgre' I discovered that the user already exists. I have confirmed 
that postgres is indeed available:
[chuck(at)vs191 ~]$ postgres --version
postgres (PostgreSQL) 8.1.9
Upgrade to PostgreSQL 8.2.5?
Before I start creating databases, it seems like I should up consider 
upgrading to PostgreSQL 8.2.5. I do not know of specific features I 
need in version 8.2.5, I just thought I should be using the latest 
stable version. Is this a good idea or should I just use version 
8.1.9? If 8.2.5 is recommended, could someone suggest the best 
approach for upgrading? If this isn't fairly quick and easy, I may 
need to do it later.
Start server and create three databases:
My top priority to start the database server and create three 
databases (with UTF-8) for my rails app. I expect that this should be 
straightforward. I have read parts of Chapters 1 and 16 in the 
Postgres manual, but I still have a few questions.
Questions:
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?
2. Do I need to manually create the data directory with postgre as 
the owner before running initdb? Such as:
sudo mkdir /usr/local/pgdata
sudo chown postgres /usr/local/pgdata
su - postgres
3. To ensure that the databases I create use UTF-8 do I merely use 
the '-E UTF8' option with initdb? Do I need to be concerned with 
locale settings such as lc-collate? My server appears to have a 
default locale setting:
[chuck(at)vs191 ~]$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
I have more questions about environment variables and starting the 
database server at reboot, but for the time being I just need to 
create three databases. I'll read the manual more before asking those 
questions.
Thanks and happy new year,
Chuck
| From | Date | Subject | |
|---|---|---|---|
| Next Message | dvanatta | 2007-12-31 23:06:21 | CREATE TYPE and pgAdmin III | 
| Previous Message | Reece Hart | 2007-12-31 18:29:04 | Re: double free corruption? |