Search Postgresql Archives

basic questions: Postgres with yum on CentOS 5.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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@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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux