Search Postgresql Archives

Re: Proper Permissions for /usr/local/pgsql/data

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

 



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.klaver@xxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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