Search Postgresql Archives

Re: Regarding installing & starting Postgres on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vikram Patil wrote:

Hello ,

I am trying to find a way to install PostgreSQL through my script/code . I don’t want to use installer provided on websites.

I compiled source and and I installed in one directory , Now I am trying to register it as a service or start database server directly.

I read in FAQs that I can start database server by revoking administrative rights. But how I can do that is not mentioned there.



create a Windows account specifically to run the server. this account needs RunAsService privilege (or whatever thats called), and needs 'full control' over the postgres DATA directory and its contents.

you can create the service something like this from a CMD shell, so I'm sure you can migrate this to your installer's setup script methods...

NET USER Postgres xyzzy
\path\to\pg_ctl register -N PGSQL-8.3 -U Postgres -P xyzzy -D \oath\to\pg\data
runas /user:Postgres "\path\to\initdb -D \path\to\data -E locale"


note that this Postgres user account needs to have full access to the data directory (which it will create if it doesn't exist, in which case, it needs write access to the parent dir)

I don't quite know the command line magic to grant that process 'Log On As a Service' privileges, however.




--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux