From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Rich Shepard <rshepard(at)appl-ecosys(dot)com> |
Subject: | Re: Proper Permissions for /usr/local/pgsql/data |
Date: | 2010-12-02 03:15:55 |
Message-ID: | 201012011915.56067.adrian.klaver@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wednesday 01 December 2010 3:01:29 pm Rich Shepard wrote:
> On Thu, 2 Dec 2010, Dmitriy Igrishin wrote:
> > You should chown your data dir (/usr/local/pgsql/data) to "postgres"
> > before you run initdb.
>
> Thank you, Dmitriy. I thought that was the proper owner but wanted to
> check first. This should be included in the document page on
> installation/upgrading. When the new version is installed in a different
> file system ownership information is not available.
>
> Rich
A couple of points.
1) From Step 5:
"Remember that you must execute these commands while logged in to the special
database user account "
To do the above the directory would need to be have permissions for the postgres
user.
2) From the beginning of the guide:
"These instructions assume that your existing installation is under
the /usr/local/pgsql directory, and that the data area is
in /usr/local/pgsql/data. Substitute your paths appropriately. "
The assumption is you are working off an existing install, so the ownership info
should already exist.
When in doubt, the best guide I have found is from the file INSTALL in the tar
ball. Add info above in upgrade case.
Short Version
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2010-12-02 03:44:30 | Re: Cannot start Postgres- FATAL: invalid cache id: 19 |
Previous Message | Craig Ringer | 2010-12-02 00:54:39 | Re: How to find correct locale name for CREATE DATABASE |