Thread: postgresql-6.3.2 question
Hello, My question is this: Do I have to be user progres to install? Can I not use an existing user? If yes, is there any change to the installation process? Thank you in advance for your help. Dave
I'm not totall sure but, I wouldn't think that user postgres has enough system rights to install. Andy On Sat, 16 May 1998, The Hermit Hacker wrote: > >Hello, > >My question is this: > >Do I have to be user progres to install? Can I not use an existing user? If >yes, is there any change to the installation process? > >Thank you in advance for your help. > >Dave > > >
On Sun, 17 May 1998, Andy Lewis wrote: > I'm not totall sure but, I wouldn't think that user postgres has enough system > rights to install. Everything for PostgreSQL gets installed, generally, in postgres users home directory...I've never had a requirement to install as anything but postgres user *shrug* > > > >Hello, > > > >My question is this: > > > >Do I have to be user progres to install? Can I not use an existing user? If > >yes, is there any change to the installation process? > > > >Thank you in advance for your help. > > > >Dave > > > > > > > Marc G. Fournier Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
On Sun, 17 May 1998, Andy Lewis wrote: > I'm not totall sure but, I wouldn't think that user postgres has enough system > rights to install. You should be root when doing the actual software installation to /usr/local, but everything else should be done as the postgres user. Brett W. McCoy http://www.lan2wan.com/~bmccoy/ ----------------------------------------------------------------------- "The number of UNIX installations has grown to 10, with more expected." -- The UNIX Programmer's Manual, 2nd Edition, June, 1972
On Sun, 17 May 1998, Brett W. McCoy wrote: > On Sun, 17 May 1998, Andy Lewis wrote: > > > I'm not totall sure but, I wouldn't think that user postgres has enough system > > rights to install. > > You should be root when doing the actual software installation to > /usr/local, but everything else should be done as the postgres user. Why? Once you've added the postgres user, with his home directory, the postgres users himself should be able to do the complete install... Marc G. Fournier Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
On Sun, 17 May 1998, The Hermit Hacker wrote: > On Sun, 17 May 1998, Brett W. McCoy wrote: > > > On Sun, 17 May 1998, Andy Lewis wrote: > > > > > I'm not totall sure but, I wouldn't think that user postgres has enough system > > > rights to install. > > > > You should be root when doing the actual software installation to > > /usr/local, but everything else should be done as the postgres user. > > Why? Once you've added the postgres user, with his home > directory, the postgres users himself should be able to do the complete > install... I've installed it both ways: * As root, when installing under /usr/local * As postgres, when installing under /home/postgres The only thing I have yet to find how to setup without root, is starting the postmaster when the system boots. -- Peter T Mount peter@retep.org.uk or petermount@earthling.net Main Homepage: http://www.retep.org.uk ************ Someday I may rebuild this signature completely ;-) ************ Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
On Sun, 17 May 1998, The Hermit Hacker wrote: > Why? Once you've added the postgres user, with his home > directory, the postgres users himself should be able to do the complete > install... Except for setting up the libraries and letting ldconfig know where they are. Actually, I had to become root also to create the install directories under /usr/local, and then change their ownership to my postgres user, since that user doesn't have the rights to create directories under /usr/local. Brett W. McCoy http://www.lan2wan.com/~bmccoy/ ----------------------------------------------------------------------- "The number of UNIX installations has grown to 10, with more expected." -- The UNIX Programmer's Manual, 2nd Edition, June, 1972
On Sun, 17 May 1998, Peter Mount wrote: > I've installed it both ways: > > * As root, when installing under /usr/local > * As postgres, when installing under /home/postgres > > The only thing I have yet to find how to setup without root, is starting > the postmaster when the system boots. For that, you do need to be root, since the startup scripts only have permissions for root access, unless you want to compromise the security of your system. However, you DO want the postmaster to be started by user postgres within the startup scripts. Brett W. McCoy http://www.lan2wan.com/~bmccoy/ ----------------------------------------------------------------------- "The number of UNIX installations has grown to 10, with more expected." -- The UNIX Programmer's Manual, 2nd Edition, June, 1972
On Sun, 17 May 1998, Brett W. McCoy wrote: > On Sun, 17 May 1998, Peter Mount wrote: > > > I've installed it both ways: > > > > * As root, when installing under /usr/local > > * As postgres, when installing under /home/postgres > > > > The only thing I have yet to find how to setup without root, is starting > > the postmaster when the system boots. > > For that, you do need to be root, since the startup scripts only have > permissions for root access, unless you want to compromise the security of > your system. Exactly > However, you DO want the postmaster to be started by user postgres > within the startup scripts. Postgres will not run as root - it kills itself on purpose if you try. -- Peter T Mount peter@retep.org.uk or petermount@earthling.net Main Homepage: http://www.retep.org.uk ************ Someday I may rebuild this signature completely ;-) ************ Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
On Sun, 17 May 1998, Peter Mount wrote: > > However, you DO want the postmaster to be started by user postgres > > within the startup scripts. > > Postgres will not run as root - it kills itself on purpose if you try. I think that's very wise! Brett W. McCoy http://www.lan2wan.com/~bmccoy/ ----------------------------------------------------------------------- "The number of UNIX installations has grown to 10, with more expected." -- The UNIX Programmer's Manual, 2nd Edition, June, 1972
On Sun, 17 May 1998, Brett W. McCoy wrote: > On Sun, 17 May 1998, The Hermit Hacker wrote: > > > Why? Once you've added the postgres user, with his home > > directory, the postgres users himself should be able to do the complete > > install... > > Except for setting up the libraries and letting ldconfig know where they > are. libraries install in ~postgres/lib, and letting the system know where they are is a simple matter of: setenv LD_LIBRARY_DIR ~postgres/lib Marc G. Fournier Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
> I've installed it both ways: > > * As root, when installing under /usr/local > * As postgres, when installing under /home/postgres > > The only thing I have yet to find how to setup without root, is starting > the postmaster when the system boots. You can use a cron-job for this. Let it test if postmaster is running, and if not start it. Run this script every 5 minutes. I use a perl-script in combination with a shell-script. The perl-script also tests if there's any response from the postmaster. If not, it first tries to kill all postgres/postmaster instances with -TERM, if that does not work, try the same with -KILL, and then start them again by calling the shell-script. Maarten _____________________________________________________________________________ | TU Delft, The Netherlands, Faculty of Information Technology and Systems | | Department of Electrical Engineering | | Computer Architecture and Digital Technique section | | M.Boekhold@et.tudelft.nl | -----------------------------------------------------------------------------