Thread: pgsql instalation

pgsql instalation

From
"Loyiso Tyira - BCX - Networks"
Date:

> I am trying to install posgresql on cygwin on XP. I have installed postgesql

> and cygipc. Did the following steps

 

> 1. $ ipc-daemon&

> 2. $ mkdir /whatever/path/pgsql

> 3. $ initdb -D /whatever/path/pgsql

> 4. $ pg_ctl -D /whatever/path/pgsql -o "-i" start

5. $ createdb testdb

>

> But step 3 fails in the end.

> Can anyone help

 

Kind Regards,
Loyiso Tyira
Networks

 

Re: pgsql instalation

From
"Leeuw van der, Tim"
Date:
Hi,
 
If you are trying this with a recent version of postgresql for cygwin, then instead of ipc-daemon you should start cygserver. I believe that the instructions are in the README in the docs, but I'm not sure of the exact path to the right version of the docs.
 
--Tim
-----Original Message-----
From: pgsql-cygwin-owner@postgresql.org [mailto:pgsql-cygwin-owner@postgresql.org]On Behalf Of Loyiso Tyira - BCX - Networks
Sent: Monday, November 08, 2004 3:28 PM
To: pgsql-cygwin@postgresql.org
Subject: [CYGWIN] pgsql instalation

> I am trying to install posgresql on cygwin on XP. I have installed postgesql

> and cygipc. Did the following steps

 

> 1. $ ipc-daemon&

> 2. $ mkdir /whatever/path/pgsql

> 3. $ initdb -D /whatever/path/pgsql

> 4. $ pg_ctl -D /whatever/path/pgsql -o "-i" start

5. $ createdb testdb

>

> But step 3 fails in the end.

> Can anyone help

 

Kind Regards,
Loyiso Tyira
Networks

 

Re: pgsql instalation

From
"Andrei Bintintan"
Date:
don't use ipc-daemon!!!!!!!!!!! it is deprecated.
 
Check the postgresql-7.4.3.README manual!!!!  in /usr/share/doc/cygwin.
 
Look at the point 6.1. That solved my problems.
 
 
1. Install and configure cygserver as a NT service:
 
    # cygserver-config
 
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:
 
    # cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /var/postgresql/data -i" --dep cygserver --termsig INT --user postgres --shutdown # [6]
 
5. Create the PostgreSQL data directory:
 
    # mkdir -p /var/postgresql/data
 
6. Change ownership of the PostgreSQL data directory:
 
    # chown postgres /var/postgresql/data # [10]
 
6.1
 
    $ chmod a+rwx /tmp
    $ chmod a+rx /usr/bin /usr/bin/*
    $ chmod a+rw /var/log # could adversely affect other daemons
 
and
 
Regardless of the installation type, the first step is to add "server" to
your CYGWIN environment variable setting and start cygserver.
 
 
 
7. Start cygserver:
 
    # cygrunsrv -S cygserver # [7]
 
 
8. Initialize PostgreSQL (*when running under the "postgres" account*):
 
    $ initdb -D /var/postgresql/data
 
9. Start postmaster:
 
    # cygrunsrv -S postmaster # [7]
 
10. Verify postmaster is running:
 
    # cygrunsrv -Q postmaster  [13]
 
11. Connect to PostgreSQL:
 
    # psql -U postgres template1 # [8] [9]
 
 
Best regards,
Andy.
----- Original Message -----
Sent: Monday, November 08, 2004 4:28 PM
Subject: [CYGWIN] pgsql instalation

> I am trying to install posgresql on cygwin on XP. I have installed postgesql

> and cygipc. Did the following steps

 

> 1. $ ipc-daemon&

> 2. $ mkdir /whatever/path/pgsql

> 3. $ initdb -D /whatever/path/pgsql

> 4. $ pg_ctl -D /whatever/path/pgsql -o "-i" start

5. $ createdb testdb

>

> But step 3 fails in the end.

> Can anyone help

 

Kind Regards,
Loyiso Tyira
Networks