|
1 | | -* You can get the most recent version of this from |
2 | | -* http://people.freebsd.org/~kevlo/postgres/portNT.html. |
| 1 | +How do I installing PostgreSQL on Windows NT or Windows 2000? |
| 2 | +============================================================= |
| 3 | +$Date: 2001/01/22 22:54:07 $ |
3 | 4 |
|
4 | | -* Problem reports can be sent to pgsql-ports@postgresql.org. |
| 5 | +1. Install the Cygwin package. |
5 | 6 |
|
6 | | -How do I install the PostgreSQL server on Windows NT or Windows 2000? |
7 | | -===================================================================== |
| 7 | + The Cygwin package provides a UNIX-like API on top of the Win32 |
| 8 | + API. It is available at <http://sources.redhat.com/cygwin/>. |
| 9 | + The 1.1.x series is recommended (1.1.7 was the latest at the time |
| 10 | + of this writing); using 1.0 or B20 might require extra efforts. |
| 11 | + For B20 you also need to download the separate crypt library at the |
| 12 | + same location. |
8 | 13 |
|
9 | | - Porting PostgreSQL to Windows 2000 installation procedures |
10 | | - |
11 | | - Thanks to Daniel Horak, JasonTishler ,Joost Kraaijeveld and Pete |
12 | | - Formanfor their helps. |
13 | | - Without them, I cannot port Postgres to Windows 2000 successfully. |
14 | | - ______________________________________________________________________ |
15 | | - |
16 | | - * Install the lastest verion(1.1.5) of Cygwin |
17 | | - |
18 | | - 1. Click on the "Install Cygwin now" link on the |
19 | | - http://sources.redhat.com/cygwinwebpage. |
20 | | - This downloads setup.exe to your system. |
21 | | - 2. Run setup and answer all of the questions. Please |
22 | | - choose a mirror sitefor your download. |
23 | | - * Install Charles Wilson's Cygwin32 IPC package |
24 | | - |
25 | | - 1. Download the precompiled binary |
26 | | - http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/cygipc/cygipc- |
27 | | - 1.07-1.tar.gzin"/" directory. |
28 | | - 2. tar zxvf cygipc-1.07-1.tar.gz |
29 | | - * Install PostgreSQL 7.0.3 |
30 | | - |
31 | | - 1. Download PostgreSQL 7.0.3 sourcecode in /usr/src. |
32 | | - 2. tar zxvf postgresql-7.0.3.tar.gz |
33 | | - 3. mkdir -p /usr/local/pgsql/{bin,include,lib,data} |
34 | | - 4. cd /usr/src/postgresql-7.0.3/src/win32 |
35 | | - 5. cp endian.h /usr/include |
36 | | - cp tcp.h /usr/include/netinet |
37 | | - 6. Apply Jason Tishler's patches in |
38 | | - /usr/src/postgresql-7.0.3, then run 'patch -p1 <patch.diff'. |
39 | | - Note that some browsers convert the patch to a text |
40 | | - mode file (i.e., CRNL line endings) |
41 | | - during the save operation which causes patch to reject |
42 | | - all hunks. |
43 | | - 7. cd /usr/src/postgresql-7.0.3/src, then run |
44 | | - './configure' |
45 | | - 8. make; make install |
46 | | - 9. cp/usr/local/pgsql/lib/pq.dll /usr/local/pgsql/bin |
47 | | - 10. Usingany editor to create .bashrc in / directory as |
48 | | - belows: |
49 | | - PATH=$PATH:/usr/local/pgsql/bin:/usr/local/bin |
50 | | - PGDATA=/usr/local/pgsql/data |
51 | | - PGLIB=/usr/local/pgsql/lib |
52 | | - LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/local/lib |
53 | | - export LD_LIBRARY_PATH PATH PGDATA PGLIB |
54 | | - 11. source/.bashrc, then run 'initdb' |
55 | | - Note that the owner of the DB system have to be |
56 | | - different from root/administrator |
57 | | - 12. Editthe file /usr/local/pgsql/data/pg_hba.conf, such as: |
58 | | - |
59 | | - host all 163.17.11.109 255.255.255.0 |
60 | | - trust |
61 | | - |
62 | | - 13. ipc-daemon& |
63 | | - 14. postmaster-i& |
64 | | - 15. Run' psql -h host_name template1'. It's easy, huh :-) |
65 | | - |
66 | | - |
67 | | - Last updated: 01/05/2001 Author: KevinLo |
| 14 | +2. Install the cygipc package, available at |
| 15 | + <http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/cygipc/>. |
| 16 | + Do not use versions prior to 1.04, they will not work. |
| 17 | + |
| 18 | +3. Optional: The "Andy Piper Tools" at <http://www.xemacs.freeserve.co.uk/> |
| 19 | + are a collection of pre-compiled libraries and utilities that you |
| 20 | + might find useful -- especially on Cygwin B20. |
| 21 | + |
| 22 | +4. The Cygwin bin directory has to be placed in the path before the |
| 23 | + Windows program directories, because the sort.exe has to be taken |
| 24 | + from Cygwin, not Windows. |
| 25 | + |
| 26 | +5. Start `ipc-daemon &' (background process) from the cygipc package. |
| 27 | + This program needs to be running anytime you start the PostgreSQL |
| 28 | + server (postmaster). |
| 29 | + |
| 30 | +6. Proceed according to the INSTALL file. (./configure; make; etc.) |
| 31 | + |
| 32 | +NOTE: There are two issues with Cygwin's current UNIX domain socket |
| 33 | +support: |
| 34 | + |
| 35 | +1. psql (and other clients) will hang if postmaster is not running and |
| 36 | + the socket file (e.g., /tmp/.s.PGSQL.5432) exists. |
| 37 | + |
| 38 | +2. Cygwin's AF_UNIX sockets are really implemented as AF_INET sockets |
| 39 | + so they are inherently insecure. |
| 40 | + |
| 41 | +Problem reports can be sent to <pgsql-ports@postgresql.org>. |