Thread: install ipc-daemon and postmaster as Windows services
I installed postgreSQL7.4 on Windows XP. I rebooted the machine, and could not log into psql any more. I have to go through ./configure, make, make install .... all over again. I guess that I need to install ipc-daemon and postmaster as Windows services. I find some instruction from internet as follows:
$ ipc-daemon --install-as-service
$ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep c-daemon -- msig --user postgres --shutdown
$ cygrunsrv -S ipc-daemon # actually this step is optional
$ cygrunsrv -S postmaster
$ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep c-daemon -- msig --user postgres --shutdown
$ cygrunsrv -S ipc-daemon # actually this step is optional
$ cygrunsrv -S postmaster
I notice that ipc-daemon should be ipc-daemon2 in vs. 7.4. But I cannot find cygrunsrv in path/usr/bin/ directory. Can you tell me whether above scripts are still valid for installing postgreSQL7.4? If they are, what is the equivalent for cygrunsrv? If they are not, what are the scripts for installing ipc-daemon and postmaster as Windows services?
Thanks
Mimi
Thank you for the information. But I searched both /bin and /usr/bin directories, they are identical and there is no such a file. By the way, are you using postqreSQL 7.4?
-----Original Message-----
From: Godshall Michael [mailto:Michael_Godshall@gmachs.com]
Sent: Thursday, December 04, 2003 3:14 PM
To: Mimi Wu; pgsql-cygwin@postgresql.org
Subject: RE: [CYGWIN] install ipc-daemon and postmaster as Windows services
From: Godshall Michael [mailto:Michael_Godshall@gmachs.com]
Sent: Thursday, December 04, 2003 3:14 PM
To: Mimi Wu; pgsql-cygwin@postgresql.org
Subject: RE: [CYGWIN] install ipc-daemon and postmaster as Windows services
Hi,
My cygrunsrv is in path/bin.
Postmaster I believe has moved as well. On mine it is now under /usr/local/pgsql/data
-----Original Message-----
From: pgsql-cygwin-owner@postgresql.org [mailto:pgsql-cygwin-owner@postgresql.org]On Behalf Of Mimi Wu
Sent: Thursday, December 04, 2003 2:52 PM
To: pgsql-cygwin@postgresql.org
Subject: [CYGWIN] install ipc-daemon and postmaster as Windows servicesI installed postgreSQL7.4 on Windows XP. I rebooted the machine, and could not log into psql any more. I have to go through ./configure, make, make install .... all over again. I guess that I need to install ipc-daemon and postmaster as Windows services. I find some instruction from internet as follows:$ ipc-daemon --install-as-service
$ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep c-daemon -- msig --user postgres --shutdown
$ cygrunsrv -S ipc-daemon # actually this step is optional
$ cygrunsrv -S postmasterI notice that ipc-daemon should be ipc-daemon2 in vs. 7.4. But I cannot find cygrunsrv in path/usr/bin/ directory. Can you tell me whether above scripts are still valid for installing postgreSQL7.4? If they are, what is the equivalent for cygrunsrv? If they are not, what are the scripts for installing ipc-daemon and postmaster as Windows services?ThanksMimi
Thanks for the detailed instruction. You are right that I need to install it first. I re run the setup, and added cygrunsrv from admin. Now, it works.
-----Original Message-----
From: Godshall Michael [mailto:Michael_Godshall@gmachs.com]
Sent: Thursday, December 04, 2003 4:08 PM
To: Mimi Wu; pgsql-cygwin@postgresql.org
Subject: RE: [CYGWIN] install ipc-daemon and postmaster as Windows services
From: Godshall Michael [mailto:Michael_Godshall@gmachs.com]
Sent: Thursday, December 04, 2003 4:08 PM
To: Mimi Wu; pgsql-cygwin@postgresql.org
Subject: RE: [CYGWIN] install ipc-daemon and postmaster as Windows services
I am using 7.4 under cygwin but on Windows 2000.
It sounds like cygrunsrv was not installed or maybe needs to be updated. I am running .96-1
The following is the NT services Cygwin PostgreSQL installation
>> procedure
>> (with footnotes designated by "[n]"):
>>
>> 1. Install the cygipc ipc-daemon as a NT service:
>> A)If you are upgrading from a version prior to 7.3.4-2
>> shutdown the postmaster and cygipc services.
>> close the service manager screen.
>> # ipc-daemon --remove-as-service
>> # ipc-daemon2 --install-as-service
>>
>> Next skip to step 4.
>>
>> B)If it is a fresh install
>> # ipc-daemon2 --install-as-service
>>
>> 2. Create the "postgres" user account:
>>
>> # net user postgres $password /add /fullname:postgres
>> /comment:'PostgreSQL user account' /homedir:"$(cygpath -w
>> /home/postgres)" # [11]
>> # mkpasswd -l -u postgres >>/etc/passwd
>>
>> 3. Grant the "postgres" user the "Log on as a service" user right:
>>
>> # cmd /c secpol.msc # [3] [4] [5] [12]
>>
>> 4. Install postmaster as a NT service:
>> A)If you are upgrading from a version prior to 7.3.4-2
>> # cygrunsrv --remove postmaster
>> # cygrunsrv --install postmaster --path /usr/bin/postmaster --args
>> "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user
>> postgres --shutdown # [6]
>>
>> Skip to step 7.
>>
>> B)If you are doing a fresh install:
>> # cygrunsrv --install postmaster --path /usr/bin/postmaster --args
>> "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user
>> postgres --shutdown # [6]
>>
>> 5. Create the PostgreSQL data directory:
>>
>> # mkdir /usr/share/postgresql/data
>>
>> 6. Change ownership of the PostgreSQL data directory:
>>
>> # chown postgres /usr/share/postgresql/data # [10]
>>
>> 7. Start the cygipc ipc-daemon:
>>
>> # net start ipc-daemon2 # [7]
>>
>> **If upgrading skip to step 9.
>>
>> 8. Initialize PostgreSQL (*when running under the "postgres" account*):
>>
>> $ initdb -D /usr/share/postgresql/data
>>
>> 9. Start postmaster:
>>
>> # net start postmaster # [7]
>>
>> 10. Connect to PostgreSQL:
>>
>> # psql -U postgres template1 # [8] [9]
>>
>> The following are the notes to the above:
>> procedure
>> (with footnotes designated by "[n]"):
>>
>> 1. Install the cygipc ipc-daemon as a NT service:
>> A)If you are upgrading from a version prior to 7.3.4-2
>> shutdown the postmaster and cygipc services.
>> close the service manager screen.
>> # ipc-daemon --remove-as-service
>> # ipc-daemon2 --install-as-service
>>
>> Next skip to step 4.
>>
>> B)If it is a fresh install
>> # ipc-daemon2 --install-as-service
>>
>> 2. Create the "postgres" user account:
>>
>> # net user postgres $password /add /fullname:postgres
>> /comment:'PostgreSQL user account' /homedir:"$(cygpath -w
>> /home/postgres)" # [11]
>> # mkpasswd -l -u postgres >>/etc/passwd
>>
>> 3. Grant the "postgres" user the "Log on as a service" user right:
>>
>> # cmd /c secpol.msc # [3] [4] [5] [12]
>>
>> 4. Install postmaster as a NT service:
>> A)If you are upgrading from a version prior to 7.3.4-2
>> # cygrunsrv --remove postmaster
>> # cygrunsrv --install postmaster --path /usr/bin/postmaster --args
>> "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user
>> postgres --shutdown # [6]
>>
>> Skip to step 7.
>>
>> B)If you are doing a fresh install:
>> # cygrunsrv --install postmaster --path /usr/bin/postmaster --args
>> "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user
>> postgres --shutdown # [6]
>>
>> 5. Create the PostgreSQL data directory:
>>
>> # mkdir /usr/share/postgresql/data
>>
>> 6. Change ownership of the PostgreSQL data directory:
>>
>> # chown postgres /usr/share/postgresql/data # [10]
>>
>> 7. Start the cygipc ipc-daemon:
>>
>> # net start ipc-daemon2 # [7]
>>
>> **If upgrading skip to step 9.
>>
>> 8. Initialize PostgreSQL (*when running under the "postgres" account*):
>>
>> $ initdb -D /usr/share/postgresql/data
>>
>> 9. Start postmaster:
>>
>> # net start postmaster # [7]
>>
>> 10. Connect to PostgreSQL:
>>
>> # psql -U postgres template1 # [8] [9]
>>
>> The following are the notes to the above:
-----Original Message-----
From: Mimi Wu [mailto:MimiW@fes.org]
Sent: Thursday, December 04, 2003 3:53 PM
To: Godshall Michael; pgsql-cygwin@postgresql.org
Subject: RE: [CYGWIN] install ipc-daemon and postmaster as Windows services
Thank you for the information. But I searched both /bin and /usr/bin directories, they are identical and there is no such a file. By the way, are you using postqreSQL 7.4?-----Original Message-----
From: Godshall Michael [mailto:Michael_Godshall@gmachs.com]
Sent: Thursday, December 04, 2003 3:14 PM
To: Mimi Wu; pgsql-cygwin@postgresql.org
Subject: RE: [CYGWIN] install ipc-daemon and postmaster as Windows servicesHi,My cygrunsrv is in path/bin.Postmaster I believe has moved as well. On mine it is now under /usr/local/pgsql/data-----Original Message-----
From: pgsql-cygwin-owner@postgresql.org [mailto:pgsql-cygwin-owner@postgresql.org]On Behalf Of Mimi Wu
Sent: Thursday, December 04, 2003 2:52 PM
To: pgsql-cygwin@postgresql.org
Subject: [CYGWIN] install ipc-daemon and postmaster as Windows servicesI installed postgreSQL7.4 on Windows XP. I rebooted the machine, and could not log into psql any more. I have to go through ./configure, make, make install .... all over again. I guess that I need to install ipc-daemon and postmaster as Windows services. I find some instruction from internet as follows:$ ipc-daemon --install-as-service
$ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep c-daemon -- msig --user postgres --shutdown
$ cygrunsrv -S ipc-daemon # actually this step is optional
$ cygrunsrv -S postmasterI notice that ipc-daemon should be ipc-daemon2 in vs. 7.4. But I cannot find cygrunsrv in path/usr/bin/ directory. Can you tell me whether above scripts are still valid for installing postgreSQL7.4? If they are, what is the equivalent for cygrunsrv? If they are not, what are the scripts for installing ipc-daemon and postmaster as Windows services?ThanksMimi