Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009

    Unanswered: Postgres silent installation...


    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...

  2. #2
    Join Date
    Nov 2003
    Provided Answers: 23
    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:
    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 -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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts