Thread: PostgreSQL installation

PostgreSQL installation

From
"Shahbaz A. Tyagi"
Date:

 

Hi,

 

How can we make PostgreSQL db up and running with out using installer i.e. we want to build the db internally and ship the db along with our application and let our application run the DB. We don’t want to include the PostgreSQL installer along with our installer and create the db while installing.

 

 

Thanks,

 

shabz

 

 

 

 

 

 

 

 

 

 

Re: PostgreSQL installation

From
"Grzegorz Jaśkiewicz"
Date:
On Mon, Dec 15, 2008 at 12:36 PM, Shahbaz A. Tyagi
<shahbaz.tyagi@sphere.ae> wrote:
>
>
> Hi,
>
>
>
> How can we make PostgreSQL db up and running with out using installer i.e.
> we want to build the db internally and ship the db along with our
> application and let our application run the DB. We don't want to include the
> PostgreSQL installer along with our installer and create the db while
> installing.


install binaries,
create user that's going to run postgresql
create data directory
set PGDATA and PGPORT for that user
run initdb
adjust config file's acordingly
start postgres
create users, and dbs
and you're pretty much done.


--
GJ

Re: PostgreSQL installation

From
"Grzegorz Jaśkiewicz"
Date:
unless you want to do it on windows, than I have no idea...

Re: PostgreSQL installation

From
Raymond O'Donnell
Date:
On 15/12/2008 12:59, Grzegorz Jaśkiewicz wrote:

> install binaries,

If it's on Windows, there may be some registry keys to be set as
well...at least, such keys exist on my laptop (XP), but I can't tell
whether they belong to PG itself or to the installer.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

Re: PostgreSQL installation

From
Raymond O'Donnell
Date:
On 15/12/2008 13:03, Grzegorz Jaśkiewicz wrote:
> unless you want to do it on windows, than I have no idea...

There's a silent installation option to the Windows installer which
AFAIK is the usual way to install Postgres via another installer.


Ray.


------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

Re: PostgreSQL installation

From
"Merlin Moncure"
Date:
On Mon, Dec 15, 2008 at 7:36 AM, Shahbaz A. Tyagi
<shahbaz.tyagi@sphere.ae> wrote:
> How can we make PostgreSQL db up and running with out using installer i.e.
> we want to build the db internally and ship the db along with our
> application and let our application run the DB. We don't want to include the
> PostgreSQL installer along with our installer and create the db while
> installing.

It's trivial to do this on every platform but windows.  On windows,
first thing you need to do is take a look at silent mode install
through the installer and makes sure that this is not a good solution
for you.  If not, you have to have the following ducks in order:

create user account: can do with net command
make sure have service rights: google ntrights.exe
install service: pg_ctl can do this
switch cmd.exe current user: runas
automatic password entry to runas: sanur.exe
run initdb

You can also code your own install in C, of course.  This requires
expert level windows coding though.

Also you have to watch out for things like automatic password
expiration, and various other windows nuisances. If (and only if) you
are on a secure network you can save some headaches by compiling out
the administrative user check.

merlin

Re: PostgreSQL installation

From
"Shahbaz A. Tyagi"
Date:
Hi,

How can I create the user and database schema? While creating user it's
taking automatically windows log in account name. I am using ant for the
same purpose.

Thanks,

Shahbaz A. Tyagi
Sphere Networks

-----Original Message-----
From: Grzegorz Jaśkiewicz [mailto:gryzman@gmail.com]
Sent: Monday, December 15, 2008 4:59 PM
To: Shahbaz A. Tyagi
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PostgreSQL installation

On Mon, Dec 15, 2008 at 12:36 PM, Shahbaz A. Tyagi
<shahbaz.tyagi@sphere.ae> wrote:
>
>
> Hi,
>
>
>
> How can we make PostgreSQL db up and running with out using installer i.e.
> we want to build the db internally and ship the db along with our
> application and let our application run the DB. We don't want to include
the
> PostgreSQL installer along with our installer and create the db while
> installing.


install binaries,
create user that's going to run postgresql
create data directory
set PGDATA and PGPORT for that user
run initdb
adjust config file's acordingly
start postgres
create users, and dbs
and you're pretty much done.


--
GJ


Re: PostgreSQL installation

From
"Grzegorz Jaśkiewicz"
Date:
just create one , dump it to a file, and restore after pg instalation.

Re: PostgreSQL installation

From
Marc Schablewski
Date:
http://pginstaller.projects.postgresql.org/silent.html

We did that in one of our setups. It works, but has some limitations.
For example, you cannot set a global encoding via the command line (its
a known installer bug in 8.3.4/8.3.5). And it didn't worked for us on
some w2k3 servers, if you didn't install to the system drive. You can
work around both issues, though, by doing the setup without running
initdb and calling initdb manually afterwards.

Marc

Raymond O'Donnell wrote:
> On 15/12/2008 13:03, Grzegorz Jaśkiewicz wrote:
>
>> unless you want to do it on windows, than I have no idea...
>>
>
> There's a silent installation option to the Windows installer which
> AFAIK is the usual way to install Postgres via another installer.
>
>
> Ray.
>
>
> ------------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod@iol.ie
> Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
> ------------------------------------------------------------------
>
>