Installing PostGreSQL automatically
Hi,
I am creating a Windows Application in .NET that will use PostGreSQL for the
database.
I will be using Installshield to install to my application, and would like
PgSQL to be installed in the background.
What files/registry entries do I need to make to have this done?
Thanks
Greg
Greg,
http://pginstaller.projects.postgresql.org/silent.html
read on there.
best wishes,
Harald
On 5/22/06, Greg <greg@officium.co.za> wrote:
Hi,
I am creating a Windows Application in .NET that will use PostGreSQL for the
database.
I will be using Installshield to install to my application, and would like
PgSQL to be installed in the background.What files/registry entries do I need to make to have this done?
Thanks
Greg
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
PostgreSQL - supported by a community that does not put you on hold
After trying this, it is close, but not really what I want.
I would prefer to bundle the selected files in my Installshield installer,
and write the necessary registry entries.
Could somebody please tell me which files, and which registry entries I need
to have PostGreSQL installed?
-----Original Message-----
From: Harald Armin Massa [mailto:haraldarminmassa@gmail.com]
Sent: 22 May 2006 04:51 PM
To: Greg
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Installing PostGreSQL automatically
Greg,
http://pginstaller.projects.postgresql.org/silent.html
read on there.
best wishes,
Harald
On 5/22/06, Greg <greg@officium.co.za> wrote:
Hi,
I am creating a Windows Application in .NET that will use PostGreSQL for
the
database.
I will be using Installshield to install to my application, and would
like
PgSQL to be installed in the background.
What files/registry entries do I need to make to have this done?
Thanks
Greg
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
PostgreSQL - supported by a community that does not put you on hold
Greg,
all the registry-entries are for "convenience", that is: to make it
possible for the installer to check if PostgreSQL is installed.
So to use PostgreSQL on Win32, simple distribute the files found
within <programs>PostgreSQL/8.1/ from a normal installation. ["normal"
is quite a challenge nontheless, as "normally" client & server libs
are distributed; together with PG-Admin in default installation]
Your challenge in not using the installer remains:
a) arranging the path correctly so that all libs are found
b) creating a user with appropriate privilges
[in corporate environments that is often better done
by whatever user administration tool they use]
c) creating the service [check pg_ctl --help]
d) initialising the datadir (initdb --help)
I tried to went down that road because of problems with earlier
pg-installers (8.0.0 beta and before); and it was harder than it
sounds, so I moved back to the installer. I recommend to you to do the
same - or report back your sucess.
On http://pgfoundry.org/projects/pginstaller/ you can find the source
to the installer; to recheck what exactly that MSI is doing; maybe
Installshield is even able to "include" the MSI definitions from there
(they are made for the "free" tools from MS to build installers)
Best wishes
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
PostgreSQL - supported by a community that does not put you on hold
Ok, I have installed PostGreSQL as a service with pg_ctl.
But when I try to start the service using pg_ctl start, I am told I have to
run the service under a non-administrator account. Which account is
used/created by the standard PostGreSQL MSI installer?
-----Original Message-----
From: Harald Armin Massa [mailto:haraldarminmassa@gmail.com]
Sent: 23 May 2006 08:43 AM
To: Greg
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Installing PostGreSQL automatically
Greg,
all the registry-entries are for "convenience", that is: to make it
possible for the installer to check if PostgreSQL is installed.
So to use PostgreSQL on Win32, simple distribute the files found
within <programs>PostgreSQL/8.1/ from a normal installation. ["normal"
is quite a challenge nontheless, as "normally" client & server libs
are distributed; together with PG-Admin in default installation]
Your challenge in not using the installer remains:
a) arranging the path correctly so that all libs are found
b) creating a user with appropriate privilges
[in corporate environments that is often better done
by whatever user administration tool they use]
c) creating the service [check pg_ctl --help]
d) initialising the datadir (initdb --help)
I tried to went down that road because of problems with earlier
pg-installers (8.0.0 beta and before); and it was harder than it
sounds, so I moved back to the installer. I recommend to you to do the
same - or report back your sucess.
On http://pgfoundry.org/projects/pginstaller/ you can find the source
to the installer; to recheck what exactly that MSI is doing; maybe
Installshield is even able to "include" the MSI definitions from there
(they are made for the "free" tools from MS to build installers)
Best wishes
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
PostgreSQL - supported by a community that does not put you on hold
Just a simple "logon as service" User with no administrative
privileges, in no administrator group or similiar whatsoever.
BTW... that "logon as service" is one of the challenging parts; be
carefull with Group Policies.
Harald
On 5/23/06, Greg <greg@officium.co.za> wrote:
Ok, I have installed PostGreSQL as a service with pg_ctl.
But when I try to start the service using pg_ctl start, I am told I have to
run the service under a non-administrator account. Which account is
used/created by the standard PostGreSQL MSI installer?-----Original Message-----
From: Harald Armin Massa [mailto:haraldarminmassa@gmail.com]
Sent: 23 May 2006 08:43 AM
To: Greg
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Installing PostGreSQL automaticallyGreg,
all the registry-entries are for "convenience", that is: to make it
possible for the installer to check if PostgreSQL is installed.So to use PostgreSQL on Win32, simple distribute the files found
within <programs>PostgreSQL/8.1/ from a normal installation. ["normal"
is quite a challenge nontheless, as "normally" client & server libs
are distributed; together with PG-Admin in default installation]Your challenge in not using the installer remains:
a) arranging the path correctly so that all libs are found
b) creating a user with appropriate privilges
[in corporate environments that is often better done
by whatever user administration tool they use]c) creating the service [check pg_ctl --help]
d) initialising the datadir (initdb --help)
I tried to went down that road because of problems with earlier
pg-installers (8.0.0 beta and before); and it was harder than it
sounds, so I moved back to the installer. I recommend to you to do the
same - or report back your sucess.On http://pgfoundry.org/projects/pginstaller/ you can find the source
to the installer; to recheck what exactly that MSI is doing; maybe
Installshield is even able to "include" the MSI definitions from there
(they are made for the "free" tools from MS to build installers)Best wishes
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
PostgreSQL - supported by a community that does not put you on hold---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
PostgreSQL - supported by a community that does not put you on hold
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Greg
Sent: 23 May 2006 12:46
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Installing PostGreSQL automaticallyOk, I have installed PostGreSQL as a service with pg_ctl.
But when I try to start the service using pg_ctl start, I am
told I have to run the service under a non-administrator
account. Which account is used/created by the standard
PostGreSQL MSI installer?
It creates one for you, normally called postgres.
See
http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pginstaller/pginst/ca/user.c
?rev=1.19&content-type=text/x-cvsweb-markup
Regards, Dave.
Import Notes
Resolved by subject fallback
Hi Greg:
The installer in win32, create a user named "postgres", yes this user is not
an administrator.
And this is ok, security reasons.
Alejandro Michelin Salomon
Porto Alegre
Brasil
-->-----Mensagem original-----
-->De: pgsql-general-owner@postgresql.org
-->[mailto:pgsql-general-owner@postgresql.org] Em nome de Greg
-->Enviada em: terça-feira, 23 de maio de 2006 08:46
-->Para: pgsql-general@postgresql.org
-->Assunto: Re: [GENERAL] Installing PostGreSQL automatically
-->
-->
-->
-->Ok, I have installed PostGreSQL as a service with pg_ctl.
-->
-->But when I try to start the service using pg_ctl start, I am
-->told I have to run the service under a non-administrator
-->account. Which account is used/created by the standard
-->PostGreSQL MSI installer?
-->
-->-----Original Message-----
-->From: Harald Armin Massa [mailto:haraldarminmassa@gmail.com]
-->Sent: 23 May 2006 08:43 AM
-->To: Greg
-->Cc: pgsql-general@postgresql.org
-->Subject: Re: [GENERAL] Installing PostGreSQL automatically
-->
-->Greg,
-->
-->all the registry-entries are for "convenience", that is: to
-->make it possible for the installer to check if PostgreSQL is
-->installed.
-->
-->So to use PostgreSQL on Win32, simple distribute the files
-->found within <programs>PostgreSQL/8.1/ from a normal
-->installation. ["normal" is quite a challenge nontheless, as
-->"normally" client & server libs are distributed; together
-->with PG-Admin in default installation]
-->
-->Your challenge in not using the installer remains:
-->
-->a) arranging the path correctly so that all libs are found
-->
-->b) creating a user with appropriate privilges
-->[in corporate environments that is often better done
-->by whatever user administration tool they use]
-->
-->c) creating the service [check pg_ctl --help]
-->
-->d) initialising the datadir (initdb --help)
-->
-->I tried to went down that road because of problems with
-->earlier pg-installers (8.0.0 beta and before); and it was
-->harder than it sounds, so I moved back to the installer. I
-->recommend to you to do the same - or report back your sucess.
-->
-->On http://pgfoundry.org/projects/pginstaller/ you can find
-->the source to the installer; to recheck what exactly that
-->MSI is doing; maybe Installshield is even able to "include"
-->the MSI definitions from there (they are made for the "free"
-->tools from MS to build installers)
-->
-->Best wishes
-->
-->Harald
-->
-->
-->--
-->GHUM Harald Massa
-->persuadere et programmare
-->Harald Armin Massa
-->Reinsburgstraße 202b
-->70197 Stuttgart
-->0173/9409607
-->-
-->PostgreSQL - supported by a community that does not put you on hold
-->
-->
-->
-->
-->
-->---------------------------(end of
-->broadcast)---------------------------
-->TIP 4: Have you searched our list archives?
-->
--> http://archives.postgresql.org
-->
-->
-->--
-->No virus found in this incoming message.
-->Checked by AVG Free Edition.
-->Version: 7.1.392 / Virus Database: 268.7.0/345 - Release
-->Date: 22/5/2006
-->
-->
-->--
-->No virus found in this incoming message.
-->Checked by AVG Free Edition.
-->Version: 7.1.392 / Virus Database: 268.7.0/345 - Release
-->Date: 22/5/2006
-->
-->
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.7.0/345 - Release Date: 22/5/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.7.0/345 - Release Date: 22/5/2006
Hi Harald,
I have tried to install the database silently, according to that document
you gave me http://pginstaller.projects.postgresql.org/silent.html but the
documentation seems to be out of date...
As the document specifies...
Normal none Normal interactive user installation
Reduced /qr No user interaction. "Full size" progress window including
progress descriptions.
Basic /qb No user interaction. Just a basic progressbar and not full
descriptions.
Silent /qn No user information at all.
Yet, these switches don't do what they say.
/qr - still requires user interaction
/qb - shows no progress bar, in fact it shows nothing. My hard drive light
flashes, but when finished, nothing is installed and the BASEDIR is still
empty!
Please help.
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Harald Armin Massa
Sent: 23 May 2006 08:43 AM
To: Greg
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Installing PostGreSQL automatically
Greg,
all the registry-entries are for "convenience", that is: to make it possible
for the installer to check if PostgreSQL is installed.
So to use PostgreSQL on Win32, simple distribute the files found within
<programs>PostgreSQL/8.1/ from a normal installation. ["normal"
is quite a challenge nontheless, as "normally" client & server libs are
distributed; together with PG-Admin in default installation]
Your challenge in not using the installer remains:
a) arranging the path correctly so that all libs are found
b) creating a user with appropriate privilges [in corporate environments
that is often better done by whatever user administration tool they use]
c) creating the service [check pg_ctl --help]
d) initialising the datadir (initdb --help)
I tried to went down that road because of problems with earlier
pg-installers (8.0.0 beta and before); and it was harder than it sounds, so
I moved back to the installer. I recommend to you to do the same - or report
back your sucess.
On http://pgfoundry.org/projects/pginstaller/ you can find the source to the
installer; to recheck what exactly that MSI is doing; maybe Installshield is
even able to "include" the MSI definitions from there (they are made for the
"free" tools from MS to build installers)
Best wishes
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
PostgreSQL - supported by a community that does not put you on hold
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Normal none Normal interactive user installation
Reduced /qr No user interaction. "Full size" progress window including
progress descriptions.
Basic /qb No user interaction. Just a basic progressbar and not full
descriptions.
Silent /qn No user information at all.Yet, these switches don't do what they say.
AFAIK, they do :P
What exact commandline are you using?
/qr - still requires user interaction
In what form? Meaning what are you prompted for?
/qb - shows no progress bar, in fact it shows nothing. My
hard drive light
flashes, but when finished, nothing is installed and the
BASEDIR is still
empty!
Weird.
One guess could be you're running against postgresql-8.1.msi and not
postgresql-8.1-int.msi, could that be it?
//Magnus
Import Notes
Resolved by subject fallback
Greg,
did you try to start the installer like
postgresql814.msi /qb ..... ???
That is rather doomed to failure.
You should try the
msiexec <whatever parms>
If you call msiexec without parms, it will give you a online help with
all the parms. Thoes /q<whatever> are from Microsoft, not from Magnus
:)
best wishes,
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
on different matter:
did you ever dream of visiting CERN? The place where the antimatter
for exploding Vatican is created? To eat in cantinas
with the worlds highest propability to stand in queue with future or
past Nobel Prize Winners? To talk about Web 2.5 at the place where Web
0.1 up to Web 1.0 were developed? register at www.europython.org!
tried calling the '-int' MSI but I get an error telling me
"The installer has encountered an unexpected error installing
this package. This may indicate a problem with the package.
The error code is 2711."This is my command line
msiexec /i postgresql-8.1.msi /qr INTERNALLAUNCH=1
ADDLOCAL=server,psql,docs SERVICEDOMAIN="%COMPUTERNAME%"
SERVICEPASSWORD="SecretWindowsPassword123"
SUPERPASSWORD="VerySecret" BASEDIR="c:\postgres"
You definitly should be using -int. You'll need to figure out what the
2711 indicates, that's an actual problem.
Try enabling logging and see if that helps you (with the -int), by
appending something like
/log install.log
And it should tell you waht is wrong.
//MAgnus
Import Notes
Resolved by subject fallback
Thanks, I got it working, in the log, it told me the 'docs' module could not
be found, so I removed it.
But now, further, in the installation, it tells me, invalid username
specified, Logon failure - unknown username or password.
Now my question, this installer will need to be installed on numerous
machines. So what do I put for the username and password values in the
command prompt?
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Magnus Hagander
Sent: 05 June 2006 03:30 PM
To: Greg; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Installing PostGreSQL automatically
tried calling the '-int' MSI but I get an error telling me "The
installer has encountered an unexpected error installing this package.
This may indicate a problem with the package.
The error code is 2711."This is my command line
msiexec /i postgresql-8.1.msi /qr INTERNALLAUNCH=1
ADDLOCAL=server,psql,docs SERVICEDOMAIN="%COMPUTERNAME%"
SERVICEPASSWORD="SecretWindowsPassword123"
SUPERPASSWORD="VerySecret" BASEDIR="c:\postgres"
You definitly should be using -int. You'll need to figure out what the
2711 indicates, that's an actual problem.
Try enabling logging and see if that helps you (with the -int), by appending
something like
/log install.log
And it should tell you waht is wrong.
//MAgnus
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly