Manual installation of PostgreSQL 8

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Manual installation of PostgreSQL 8

frank church



I have tried the pginstaller a number of times on my system and it always ends
in failure.

I have seen a setup file on the pgfoundry site that allows manual installation.

Is there some documentation for it?

I also sw some instructions for a silent installation - are they 2 options the
same?

I have been able to install cygwin postgresql a number of times, manually so I
am sure I will be able to do the manual installation.

I just need to be able to get past the initdb failure

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Reply | Threaded
Open this post in threaded view
|

Re: Manual installation of PostgreSQL 8

John DeSoi

On Jul 19, 2005, at 7:50 AM, frank church wrote:

> I have tried the pginstaller a number of times on my system and it  
> always ends
> in failure.
>
> I have seen a setup file on the pgfoundry site that allows manual  
> installation.
>
> Is there some documentation for it?
>
> I also sw some instructions for a silent installation - are they 2  
> options the
> same?
>
> I have been able to install cygwin postgresql a number of times,  
> manually so I
> am sure I will be able to do the manual installation.
>
> I just need to be able to get past the initdb failure


If you install mingw, then you just compile and make like any other  
platform with the instructions provided in the main documentation. I  
never used cygwin, but I assume the process is the same.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org
Reply | Threaded
Open this post in threaded view
|

Re: Manual installation of PostgreSQL 8

Merlin Moncure
In reply to this post by frank church

> I have tried the pginstaller a number of times on my system and it always

> ends

> in failure.

>

> I have seen a setup file on the pgfoundry site that allows manual

> installation.

>

> Is there some documentation for it?

>

following is steps to do complete manual install without using install pgm in windows batch. 

note:

1.    replace some_location with location of destination database folder

2.    pg binaries must be in path before running batch (grab the binaries only distro).  you may want to prefix the binaries in the batch with the full path.

3.    ntrights is utility to manually add user rights (google it). sanur is utility to force runas to accept password from pipe (google it).

4.    service name, database NT user account, and database NT password are all ‘PostgreSQL’ override as necessary.

5.    to trouble shoot initdb problems run cmd from within runas line and run initdb manually and you can see the error (or check the log anytime).

 

net user /add PostgreSQL PostgreSQL /PASSWORDCHG:NO /usercomment:"PostgreSQL Database Account"

ntrights +r SeServiceLogonRight -u PostgreSQL

runas /user: PostgreSQL "initdb --no-locale -D some_location" | sanur PostgreSQL

echo Press Enter when database init is finished (init window goes away).

pause

pg_ctl register -N e PostgreSQL -U PostgreSQL -P PostgreSQL -D some_location

net start PostgreSQL

echo installation finished

pause

 

Reply | Threaded
Open this post in threaded view
|

Re: Manual installation of PostgreSQL 8

Andrew Dunstan
In reply to this post by John DeSoi


John DeSoi wrote:

>>
>> I just need to be able to get past the initdb failure
>
>
> If you install mingw, then you just compile and make like any other  
> platform with the instructions provided in the main documentation. I  
> never used cygwin, but I assume the process is the same.
>

There's one small wrinkle. After you run "make install" you need to be
sure that libpq.dll is in a place where it will be found by the programs
that need it (including initdb). That's why the buildfarm script copies
it from <installroot>/lib to <installroot>/bin on Windows and Cygwin
(meaning that we don't have to mangle the path or put the DLL in the
system folder).

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org
Reply | Threaded
Open this post in threaded view
|

Re: Manual installation of PostgreSQL 8

Obe, Regina
In reply to this post by frank church
This may not be your problem, but thought I'd mention it since I had the
problem installing on a remote windows server.

If you are trying to install via Terminal services,  there is a documented
issue that it can't do an init in regular mode.   You have to connect to the
terminal services in console mode

mstsc /console

The below link has other known documented issues with installing on Windows.
Probably good to go thru the list if you haven't already.

http://pginstaller.projects.postgresql.org/faq/FAQ_windows.html#3.1



-----Original Message-----
From: frank church [mailto:[hidden email]]
Sent: Tuesday, July 19, 2005 7:51 AM
To: [hidden email]
Subject: [pgsql-hackers-win32] Manual installation of PostgreSQL 8





I have tried the pginstaller a number of times on my system and it always
ends in failure.

I have seen a setup file on the pgfoundry site that allows manual
installation.

Is there some documentation for it?

I also sw some instructions for a silent installation - are they 2 options
the same?

I have been able to install cygwin postgresql a number of times, manually so
I am sure I will be able to do the manual installation.

I just need to be able to get past the initdb failure

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [hidden email] so that your
       message can get through to the mailing list cleanly
Reply | Threaded
Open this post in threaded view
|

Re: Manual installation of PostgreSQL 8

frank church
Quoting "Obe, Regina     DND\\\\MIS" <[hidden email]>:

I experienced this problem, as I was trying to install on a remote server as
well.

Thanks for the tip.

> This may not be your problem, but thought I'd mention it since I had the
> problem installing on a remote windows server.
>
> If you are trying to install via Terminal services,  there is a documented
> issue that it can't do an init in regular mode.   You have to connect to the
> terminal services in console mode
>
> mstsc /console
>
> The below link has other known documented issues with installing on Windows.
> Probably good to go thru the list if you haven't already.
>
> http://pginstaller.projects.postgresql.org/faq/FAQ_windows.html#3.1
>
>
>
> -----Original Message-----
> From: frank church [mailto:[hidden email]]
> Sent: Tuesday, July 19, 2005 7:51 AM
> To: [hidden email]
> Subject: [pgsql-hackers-win32] Manual installation of PostgreSQL 8
>
>
>
>
>
> I have tried the pginstaller a number of times on my system and it always
> ends in failure.
>
> I have seen a setup file on the pgfoundry site that allows manual
> installation.
>
> Is there some documentation for it?
>
> I also sw some instructions for a silent installation - are they 2 options
> the same?
>
> I have been able to install cygwin postgresql a number of times, manually so
> I am sure I will be able to do the manual installation.
>
> I just need to be able to get past the initdb failure
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org
Reply | Threaded
Open this post in threaded view
|

Re: Manual installation of PostgreSQL 8

frank church
In reply to this post by John DeSoi
Quoting John DeSoi <[hidden email]>:

On trying to install cygwin I realised that there was postmaster service left
over from installing cygwin postgres before.

I tried a few more times, and realised that the postgres user rights to the data
folder were not being set properly in cygwin. So I tried an initdb on a postgres
user folder, and that failed because of some /dev/null error related to recent
changes in cygwin.dll.

The only saving grace of the cygwin version was the fact that because the initdb
is written in shell language it was possible to see where the command that
failed was and fix it.

But alas the postmaster core dumped everytime I try to start.

I think what is more important for the pginstaller group is probably a
specification of the necessary conditions required for all the various steps of
the installation and configuration to succeed, the steps required and how they
can be implemented, and examples of how they can be implemented in various
scripting languages. I am sure that a general purpose language could have
spotted that the postmaster service existed and was configured differently and
warned me at that stage.

From them on people could implement their own installers in any general purpose
scripting language, whether WSH, bash, or even the DOS batch language, or even
install from the command prompt by hand.

I realised for instance that in the cygwin installation the xcacls program can
probably configure the /var/postgresql/data folder for the postgres user in a
short sequence of commands, if not just one.

I think the pginstaller group should reconsider the policy of installing the
service user under a separate account. It is understandable that the Unix world
does not believe in giving naive end users enough rope to hang themselves with,
but some of these issues can harm the advocacy of PostgreSQL in the Windows
world. It doesn't seem to have hurt MySQL or Firebird - at least make it an
option.

Anyway, real men use  DOS, real men program in shell, and real men compile from
source. We also don't drink diet coke and decaf.

I am going to install from source.

PS. Is the a list of instructions I can use to install the raw precompiled
binaries

>
> On Jul 19, 2005, at 7:50 AM, frank church wrote:
>
> > I have tried the pginstaller a number of times on my system and it
> > always ends
> > in failure.
> >
> > I have seen a setup file on the pgfoundry site that allows manual
> > installation.
> >
> > Is there some documentation for it?
> >
> > I also sw some instructions for a silent installation - are they 2
> > options the
> > same?
> >
> > I have been able to install cygwin postgresql a number of times,
> > manually so I
> > am sure I will be able to do the manual installation.
> >
> > I just need to be able to get past the initdb failure
>
>
> If you install mingw, then you just compile and make like any other
> platform with the instructions provided in the main documentation. I
> never used cygwin, but I assume the process is the same.
>
>
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL
>
>



>
> On Jul 19, 2005, at 7:50 AM, frank church wrote:
>
> > I have tried the pginstaller a number of times on my system and it
> > always ends
> > in failure.
> >
> > I have seen a setup file on the pgfoundry site that allows manual
> > installation.
> >
> > Is there some documentation for it?
> >
> > I also sw some instructions for a silent installation - are they 2
> > options the
> > same?
> >
> > I have been able to install cygwin postgresql a number of times,
> > manually so I
> > am sure I will be able to do the manual installation.
> >
> > I just need to be able to get past the initdb failure
>
>
> If you install mingw, then you just compile and make like any other
> platform with the instructions provided in the main documentation. I
> never used cygwin, but I assume the process is the same.
>
>
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL
>
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Reply | Threaded
Open this post in threaded view
|

Re: Manual installation of PostgreSQL 8

Andrew Dunstan


frank church wrote:

>
>I tried a few more times, and realised that the postgres user rights to the data
>folder were not being set properly in cygwin. So I tried an initdb on a postgres
>user folder, and that failed because of some /dev/null error related to recent
>changes in cygwin.dll.
>  
>

Please provide more details. If they have broken things again I will be
quite annoyed. Chasing things down the last time was very difficult.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Reply | Threaded
Open this post in threaded view
|

Re: Manual installation of PostgreSQL 8

Magnus Hagander
In reply to this post by frank church
> I tried a few more times, and realised that the postgres user
> rights to the data folder were not being set properly in
> cygwin. So I tried an initdb on a postgres user folder, and
> that failed because of some /dev/null error related to recent
> changes in cygwin.dll.

Note that the cygwin version is a completely different product from the
native win32 version. I would strongly advice you not to run them on the
same machine.
(And personally I wouldn't run the cygwin version at all now that the
native one exists, but I realise there may be reasons when you have to)


> I think what is more important for the pginstaller group is
> probably a specification of the necessary conditions required
> for all the various steps of the installation and
> configuration to succeed, the steps required and how they can
> be implemented, and examples of how they can be implemented
> in various scripting languages. I am sure that a general
> purpose language could have spotted that the postmaster
> service existed and was configured differently and warned me
> at that stage.

The installer looks for other installations of the native win32 version.
It also looks for cygwin products in the PATH, and warns you to remove
them. It also checks that the TCP/IP port you chose to use is not in use
(which it would be if you had a conflicting cygwin version already
installed). I'm not sure what else you want us to check?

The installer supports silent installs. There are a couple of things
(notably the creation of the service account) that can't be scripted
inside the installer ATM. But the documentation clearly states what the
requirements are on this account. How you do it is of course dependent
of your scripting language, but creating an account and assigning it a
right is not complicated. THe same for setting filesystem permissions.
What more exactly do you need documetnation for?


> From them on people could implement their own installers in
> any general purpose scripting language, whether WSH, bash, or
> even the DOS batch language, or even install from the command
> prompt by hand.

The required documentation to do it by hand is available. It's the same
requirements as unix, except you have to translate paths and permissions
to windows. The only other difference is you have to register it as a
service, vs on unix you put it in /etc/rc.d.


> I realised for instance that in the cygwin installation the
> xcacls program can probably configure the
> /var/postgresql/data folder for the postgres user in a short
> sequence of commands, if not just one.

Again, the cygwin installation is a completely different product. The
native version does just this - it sets the correct permissions on the
directories you install it in.
Last time I checked many parts of cygwin (and certainly not just
postgresql) wasn't really geared towards a modern windows box where you
actually use permissions and aren't always an admin.


> I think the pginstaller group should reconsider the policy of
> installing the service user under a separate account.

This is not a questino for pginstaller. The backend *will not start*
when running as an admin user.
We could add support for "network service" on Windows 2003 though -
might be worth looking at that for 8.1.

> It is understandable that the Unix world does not believe in giving
> naive end users enough rope to hang themselves with,

People in the windows world are finally starting to realise this as
well. Including Microsoft. They are pushing *heavily* for people not to
use admin for services, and not to use admin accotns to log in. Just
look at what they're doing for Longhorn...
And this is not just naive end users, this includes highly experienced
administrators as well.


> ut some of these issues can harm the advocacy of PostgreSQL in the
> Windows world. It doesn't seem to have hurt MySQL or Firebird
> - at least make it an option.

Really? Then how come the remote-exec vulns we've seen in MySQL lately
have given people complete control over the server, whereas similar
vulns on postgresql could only hurt the database? And how come serious
database vendors on windows (read: at least microsoft) strongly advise
you *not* to use local system for the server?

Search the archives for discussions about this. Bottom line - not going
to happen. It is *not* difficult to create a service user. If you can't
do that, you will hit a lot of other problems if you are going to run a
database server. And heck, the installer will even do it for you! The
tiny gain just isn't worth the increas in risk.


> PS. Is the a list of instructions I can use to install the
> raw precompiled binaries

No, not curerntly. There are instructions for source and for MSI only.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq
Reply | Threaded
Open this post in threaded view
|

Re: Manual installation of PostgreSQL 8

Jason Long
In reply to this post by Obe, Regina
I used http://www.realvnc.com/ as per someone else's suggestion on this
list.  This worked perfectly.

Thank you for your time,

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Obe, Regina
DND\MIS
Sent: Wednesday, July 20, 2005 8:08 AM
To: 'frank church'; [hidden email]
Subject: Re: [pgsql-hackers-win32] Manual installation of PostgreSQL 8

This may not be your problem, but thought I'd mention it since I had the
problem installing on a remote windows server.

If you are trying to install via Terminal services,  there is a documented
issue that it can't do an init in regular mode.   You have to connect to the
terminal services in console mode

mstsc /console

The below link has other known documented issues with installing on Windows.
Probably good to go thru the list if you haven't already.

http://pginstaller.projects.postgresql.org/faq/FAQ_windows.html#3.1



-----Original Message-----
From: frank church [mailto:[hidden email]]
Sent: Tuesday, July 19, 2005 7:51 AM
To: [hidden email]
Subject: [pgsql-hackers-win32] Manual installation of PostgreSQL 8





I have tried the pginstaller a number of times on my system and it always
ends in failure.

I have seen a setup file on the pgfoundry site that allows manual
installation.

Is there some documentation for it?

I also sw some instructions for a silent installation - are they 2 options
the same?

I have been able to install cygwin postgresql a number of times, manually so
I am sure I will be able to do the manual installation.

I just need to be able to get past the initdb failure

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [hidden email] so that your
       message can get through to the mailing list cleanly



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster