Re: [SLUG] a simple cygwin question... I think.

From: Jared Quedens (jared_quedens@yahoo.com)
Date: Fri Apr 25 2003 - 17:12:34 EDT


I might have confused you a bit. However I did figure out the problem and solved it last night.. I
found a hardly readable readme file online that gave me the answer. Cygwin uses an ipc-daemon for
postgres, although they claim its outdated, you still need to use it with postgres for now. That
daemon is installed as an NT service! as well as postmaster. you grant postgres the log on as
service right. XP actually starts the services as postgres, NOT cygwin starting it as a daemon.
Thats where i got lost. This is what i found that helped for anyone interested...

The following is the NT services Cygwin PostgreSQL installation procedure:
1. Install the cygipc ipc-daemon as a NT service: # ipc-daemon --install-as-service
2. Create the "postgres" user account: # cmd /c lusrmgr.msc # [3]
3. Grant the "postgres" user the "Log on as a service" user right: # cmd /c secpol.msc [4]
4. Install postmaster as a NT service: # cygrunsrv --install postmaster --path /usr/bin/postmaster
--args "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user postgres
--shutdown # [5] [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
7. Initialize PostgreSQL (*when running under the "postgres" account*): $ initdb -D
/usr/share/postgresql/data
5. Start the cygipc ipc-daemon: # net start ipc-daemon # [7]
6. Start postmaster: # net start postmaster # [7]
7. Connect to PostgreSQL: # psql -U postgres template1
[8]
[9]

The following are the notes to the above:
[1] The "#" prompt indicates running as a user which is a member of the Local Administrators
group.
[2] The "$" prompt indicates running as the "postgres" user. Log in as "postgres" or use ssh to
emulate Unix's "su" command.
[3] On Windows 2000, this starts the "Local Users and Groups" applet. On Windows NT 4.0, do the
analogous operation.
[4] On Windows 2000, this starts the "Local Security Settings" applet. On Windows NT 4.0, do the
analogous operation.
[5] Do not use rxvt for this step because the password exchange will not work properly.
[6] Clean postmaster shutdown will only work with a post Cygwin 1.3.2 snapshot from 2001-Jul-28 or
later.
[7] Cygwin's bin directory (e.g., C:\Cygwin\bin) must be added to the Windows NT/2000's system
PATH and the machine rebooted for the SCM to find cygwin1.dll.
[8] Actually, psql can run under any user account.
[9] One can use PostgreSQL's createuser command or set PGUSER to obviate the need to specify "-U
postgres" on the psql command line.

So case closed!!! :-) i now have a working postgres in cygwin.. Although the setup is a little
tricky I like the idea of having it in my xp services. not a bad twist.. Thanx all who helped and
I hope someone out there will benifit from my misery! :-)
  

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:34:03 EDT