Results 1 to 2 of 2
Thread: Postgres silent installation...
12-23-09, 07:40 #1Registered User
- Join Date
- Dec 2009
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...
12-23-09, 08:28 #2Registered User
- Join Date
- Nov 2003
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 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
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.