If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > PostgreSQL > Postgres silent installation...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Dec 2009
Posts: 4
Postgres silent installation...

Hi

I installed postgresql-8.3-int on WinXP SP2 using command msiexec /i "postgresql-8.2-int.msi" /qn INTERNALLAUNCH=1 DOSERVICE=1 DOINITDB=0 ADDLOCAL=ALL CREATESERVICEUSER=1 SERVICEDOMAIN="%COMPUTERNAME%" SERVICEPASSWORD="!qsdT2M#y*N%24" SUPERPASSWORD="!qsdT2M#y*N%28" LOCALE=C ENCODING="UTF8"
It got installed but i am unable to start the service, investigating more i found that there are no conf file installed.


Please guide me in my installation.

Thanks in advance...
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Nov 2003
Posts: 2,780
Quote:
Originally Posted by yogi1410 View Post
i found that there are no conf file installed.
The conf file is created when you run initdb. So you need to included that somehow in your installation process.

I have no experience with the msi installer, but you can simply use the zip binaries, extract them and run initdb and pg_ctl register from within your "main" installation routine.

Something like this:
Code:
REM create Windows user
net user postgres windows_password /ADD

REM create a PW file for the Postgres super user
echo my_secret_postgres_password > password.txt
unzip postgresql-8.4.2-1-windows-binaries.zip -d mypostgresinstalldir

REM run initdb
mypostgresinstalldir\pgsql\bin\initdb -D mydatadir -U postgres --pwfile=password.txt -E UTF8 -A md5

REM register the Postgres windows service
pg_ctl register -N PostgreSQL -U postgres -P windows_password -D mydatadir
Of course you'll need to replace mypostgresinstalldir and mydatadir with the full path to the real directories.
If you install Postgres into c:\Program Files do not place the data directory inside that directory. Regular users do not have write access there, which will make the service fail when starting.

Make sure mydatadir has the correct security settings so that the postgres user can write to that directory.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On