Re: Problems running PostGreSQL silent install

Lists: pgsql-generalpgsql-novice
From: "Greg Quinn" <greg(at)officium(dot)co(dot)za>
To: <pgsql-novice(at)postgresql(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Problems running PostGreSQL silent install
Date: 2006-10-27 20:14:24
Message-ID: 003401c6fa04$820ed0a0$6501a8c0@melt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-novice

I have seen many problems like this in the forum, but cannot see a solution
for mine...

I have created an account with restricted privileges for the service.
Everything works fine until I get an error running the silent install.

Failed to run initdb: 1!

I then check the logfile, and it says

The files belonging to this database system will be owned by user
"postgres2".
This user must also own the server process.

The database cluster will be initialized with locale C.

initdb: directory "C:/Program Files/PostgreSQL/8.1/data" exists but is not
empty
If you want to create a new database system, either remove or empty
the directory "C:/Program Files/PostgreSQL/8.1/data" or run initdb
with an argument other than "C:/Program Files/PostgreSQL/8.1/data".

The problem is, that I am trying to install a second instance of PostGreSQL
on another port in another location my test computer.
Is this possible?

Here is my silent install .bat script file

msiexec.exe /i postgresql-8.1-int.msi /qr INTERNALLAUNCH=1
ADDLOCAL=server,psql BASEDIR="c:\postgres" SERVICEDOMAIN="%COMPUTERNAME%"
SERVICEACCOUNT="postgres2" SERVICEPASSWORD="test" SUPERPASSWORD="o2BS#9798"
LISTENPORT=9092


From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Greg Quinn" <greg(at)officium(dot)co(dot)za>, <pgsql-novice(at)postgresql(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problems running PostGreSQL silent install
Date: 2006-10-27 20:21:33
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA0FCCD@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-novice

> initdb: directory "C:/Program Files/PostgreSQL/8.1/data"
> exists but is not empty If you want to create a new database
> system, either remove or empty the directory "C:/Program
> Files/PostgreSQL/8.1/data" or run initdb with an argument
> other than "C:/Program Files/PostgreSQL/8.1/data".
>
>
> The problem is, that I am trying to install a second instance
> of PostGreSQL on another port in another location my test computer.
> Is this possible?

No, the MSI instlaler only lets you install once instance on each
machine. (Unless you are talking different versions, that is). You can,
however, install one instance with the MSI installer, and then manually
run initdb and pg_ctl register to set up a second service with a
different data directory.

//Magnus


From: "Greg Quinn" <greg(at)officium(dot)co(dot)za>
To: <pgsql-novice(at)postgresql(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problems running PostGreSQL silent install
Date: 2006-10-27 20:27:57
Message-ID: 000001c6fa06$641c4580$6501a8c0@melt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-novice

Thank you for the reply.
But then are you saying I don't even really need to use the MSI in the first
place?
I can just copy the files to a folder. Then run initdb and pg_ctl?

I am bundling PostGreSQL with my software package. And will be using
Installshield to copy my program files to the client computer.
Now can I just get the PostGresql folder, put it where I want, then
Run initdb and pg_ctl?

-----Original Message-----
From: Magnus Hagander [mailto:mha(at)sollentuna(dot)net]
Sent: Friday, October 27, 2006 10:22 PM
To: Greg Quinn; pgsql-novice(at)postgresql(dot)org
Cc: pgsql-general(at)postgresql(dot)org
Subject: RE: [GENERAL] Problems running PostGreSQL silent install

No, the MSI instlaler only lets you install once instance on each
machine. (Unless you are talking different versions, that is). You can,
however, install one instance with the MSI installer, and then manually
run initdb and pg_ctl register to set up a second service with a
different data directory.

//Magnus


From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Greg Quinn" <greg(at)officium(dot)co(dot)za>, <pgsql-novice(at)postgresql(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problems running PostGreSQL silent install
Date: 2006-10-27 20:36:36
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA0FCCF@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-novice

> Thank you for the reply.
> But then are you saying I don't even really need to use the
> MSI in the first place?
> I can just copy the files to a folder. Then run initdb and pg_ctl?

Sure. The MSI is just a convenient way to get everything into place, and
to set icons and stuff.

> I am bundling PostGreSQL with my software package. And will
> be using Installshield to copy my program files to the client
> computer.
> Now can I just get the PostGresql folder, put it where I
> want, then Run initdb and pg_ctl?

Yes, certainly. If you just need the backend, you will just need that
and possibly set some permissions. You can look at the code to
pginstaller (http://pgfoundry.org/projects/pginstaller/) to get details
of exactly what it does. Much of the code is to deal with service
account verification and creation - if you already have this solved
elsewhere, you can probably get around things much easier.

//Magnus