Thread: New install doc

New install doc

From
Vince Vielhaber
Date:
2. If you are not upgrading an existing system then skip to .

skip to 4.

6. Install the program. Type
    $ gmake install

The installer needs to have write access to the install directory.

 8. Create the database installation. To do this you must log in to your    PostgreSQL superuser account. It will not
workas root.
 
    $ mkdir /usr/local/pgsql/data    $ chown postgres /usr/local/pgsql/data

I thought the data directory was created either in the gmake install step
or initdb.   Either way the chown might be better as:

# chown -R postgres:postgres /usr/local/pgsql

that should be the same on most systems with perhaps the exception of the
colon.  Anyway it'll make sure that all the files have the correct owners.


9. The previous step should have told you how to start up the database    server. Do so now.
    $ /usr/local/pgsql/initdb/postmaster -D /usr/local/pgsql/data

Shouldn't that be /usr/local/pgsql/bin/postmaster ??                                  ^^^


Outside of that, it looks great!!

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net  128K ISDN: $24.95/mo or less - 56K Dialup:
$17.95/moor less at Pop4       Online Campground Directory    http://www.camping-usa.com      Online Giftshop
Superstore   http://www.cloudninegifts.com
 
==========================================================================




Re: [HACKERS] New install doc

From
Peter Eisentraut
Date:
On 2000-01-20, Vince Vielhaber mentioned:

> 
>  2. If you are not upgrading an existing system then skip to .
> 
> skip to 4.
> 
> 
>  6. Install the program. Type
> 
>      $ gmake install
> 
> The installer needs to have write access to the install directory.

Presumably the installer would only try to install to a directory that he
has access to. With the new installation instructions you will end up
installing the program files as root, which is a) the normal thing to do,
b) less confusing, and c) more secure, since an astray trigger function
can't fry your installation proper. You can of course install it under
whatever user you want, but then you ought to be experienced enough to
figure it out yourself.

I remember my first installation and the juggling with su in and su out
and, darn, now I installed this as the wrong user, chown -R, etc. only to
find out that this was completely unnecessary. Consider Apache (my
rolemodel :), you don't install that as 'nobody' either.


>   8. Create the database installation. To do this you must log in to your
>      PostgreSQL superuser account. It will not work as root.
> 
>      $ mkdir /usr/local/pgsql/data
>      $ chown postgres /usr/local/pgsql/data
> 
> I thought the data directory was created either in the gmake install step
> or initdb.   Either way the chown might be better as:

No, it never was. Not sure if initdb used to create the data directory
itself, at least now it does try to do so if it doesn't exist. But if you
are going to put your data into a root-owned dir (such as
/usr/local/pgsql/data) you must create it first and change the ownership.

> # chown -R postgres:postgres /usr/local/pgsql
> 
> that should be the same on most systems with perhaps the exception of the
> colon.  Anyway it'll make sure that all the files have the correct owners.

No. See above.

> 
> 
> 9. The previous step should have told you how to start up the database
>      server. Do so now.
> 
>      $ /usr/local/pgsql/initdb/postmaster -D /usr/local/pgsql/data
> 
> Shouldn't that be /usr/local/pgsql/bin/postmaster ??

Oops.


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden




Re: [HACKERS] New install doc

From
Vince Vielhaber
Date:
On 23-Jan-00 Peter Eisentraut wrote:
> On 2000-01-20, Vince Vielhaber mentioned:
>> I thought the data directory was created either in the gmake install step
>> or initdb.   Either way the chown might be better as:
> 
> No, it never was. Not sure if initdb used to create the data directory
> itself, at least now it does try to do so if it doesn't exist. But if you
> are going to put your data into a root-owned dir (such as
> /usr/local/pgsql/data) you must create it first and change the ownership.
> 
>> # chown -R postgres:postgres /usr/local/pgsql
>> 
>> that should be the same on most systems with perhaps the exception of the
>> colon.  Anyway it'll make sure that all the files have the correct owners.
> 
> No. See above.

The reason I mentioned it is on one install where I used:

install -u postgres -g postgres

all of the directories were created ug root:wheel and the files in them
were ug postgres:postgres so I had to go back one and do the above chown.
PostgreSQL couldn't create databases.

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net  128K ISDN: $24.95/mo or less - 56K Dialup:
$17.95/moor less at Pop4       Online Campground Directory    http://www.camping-usa.com      Online Giftshop
Superstore   http://www.cloudninegifts.com
 
==========================================================================




Re: [HACKERS] New install doc

From
Peter Eisentraut
Date:
On 2000-01-22, Vince Vielhaber mentioned:

> >> # chown -R postgres:postgres /usr/local/pgsql
> >> 
> >> that should be the same on most systems with perhaps the exception of the
> >> colon.  Anyway it'll make sure that all the files have the correct owners.

> The reason I mentioned it is on one install where I used:
> 
> install -u postgres -g postgres
> 
> all of the directories were created ug root:wheel and the files in them
> were ug postgres:postgres so I had to go back one and do the above chown.
> PostgreSQL couldn't create databases.

Ha! If you try to subvert the make install logic then you're on your
own. The directories are created by a script called mkinstalldirs (which
is used by the rest of the world as well) and that doesn't know about
permissions. If you would like this to work, then how about patching up
mkinstalldirs? You'll find it in the src dir, it's a really simple thingy.

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden