Обсуждение: Install issues

Поиск
Список
Период
Сортировка

Install issues

От
Alex
Дата:
Using Windows 7 64 bit. Tried to install 8.4 and 9.0and it fails right
near the end when it tries to create or read the conf file. If I
transfer my postgres 8.4 file over the upgrade takes but the postgres
service doesn't exist so no communication occurs.

Is there anyway to just install the postgres service? Or another solution?

Re: Install issues

От
John R Pierce
Дата:
On 03/22/11 9:33 AM, Alex wrote:
> Using Windows 7 64 bit. Tried to install 8.4 and 9.0and it fails right
> near the end when it tries to create or read the conf file. If I
> transfer my postgres 8.4 file over the upgrade takes but the postgres
> service doesn't exist so no communication occurs.
>
> Is there anyway to just install the postgres service? Or another
> solution?
>

to create a windows service manually, from the command line prompt, try...

  c:\> sc create postgresql-8.4 binpath=
'"D:/postgres/8.4/bin/pg_ctl.exe" runservice -N postgresql-8.4 -D
"D:/postgres/8.4/data" -w' type= own start= auto depend= RPCSS obj=
./postgres password= yerpgservicepassword


*(yes, thats all one long gnarly line... fix your binary path and data
path as you need...  and yes there's a space after each = and no space
before, this command was designed by aliens)

when you think you got it rigth...

C:\> sc qc postgresql-8.4

should output something like....


SERVICE_NAME: postgresql-8.4
         TYPE               : 10  WIN32_OWN_PROCESS
         START_TYPE         : 2   AUTO_START
         ERROR_CONTROL      : 1   NORMAL
         BINARY_PATH_NAME   : D:/postgres/8.4/bin/pg_ctl.exe runservice
-N "postgresql-8.4" -D "D:/postgres/8.4/data" -w
         LOAD_ORDER_GROUP   :
         TAG                : 0
         DISPLAY_NAME       : postgresql-8.4 - PostgreSQL Server 8.4
         DEPENDENCIES       : RPCSS
         SERVICE_START_NAME : .\postgres



Re: Install issues

От
Thomas Kellerer
Дата:
Alex, 22.03.2011 17:33:
> Using Windows 7 64 bit. Tried to install 8.4 and 9.0and it fails right near the end when it tries to create or read
theconf file. If I transfer my postgres 8.4 file over the upgrade takes but the postgres service doesn't exist so no
communicationoccurs. 
>
> Is there anyway to just install the postgres service? Or another solution?
>
If you have the binaries and can start the server using pg_ctl, then you can always register the service using pg_ctl:

pg_ctl register -N PostgreSQL -U windows_user -P secret_windows_password -D c:/Data/Postgres

More details are in the manual:
   http://www.postgresql.org/docs/current/static/app-pg-ctl.html