New install doc

Lists: pgsql-hackers
From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: hackers(at)postgresql(dot)org
Subject: New install doc
Date: 2000-01-20 23:16:41
Message-ID: XFMail.000120181641.vev@michvhf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


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

# 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(at)michvhf(dot)com http://www.pop4.net
128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Vince Vielhaber <vev(at)michvhf(dot)com>
Cc: hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] New install doc
Date: 2000-01-23 01:29:54
Message-ID: Pine.LNX.4.21.0001221804120.3007-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden


From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] New install doc
Date: 2000-01-23 01:36:52
Message-ID: XFMail.000122203652.vev@michvhf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


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(at)michvhf(dot)com http://www.pop4.net
128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Vince Vielhaber <vev(at)michvhf(dot)com>
Cc: hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] New install doc
Date: 2000-01-24 23:50:02
Message-ID: Pine.LNX.4.21.0001242105030.525-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden