Re: Regarding installing & starting Postgres on Windows

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Regarding installing & starting Postgres on Windows
Дата
Msg-id 4A8DC1FC.8000105@hogranch.com
обсуждение исходный текст
Ответ на Regarding installing & starting Postgres on Windows  ("Vikram Patil" <vpatil@actuate.com>)
Список pgsql-general
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.




В списке pgsql-general по дате отправления:

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Function for replace
Следующее
От: paulo matadr
Дата:
Сообщение: Enc: Res: Function for replace