]> granicus.if.org Git - postgresql/blob - INSTALL
Currently, contrib/oid2name doesn't bother to free() the memory that it
[postgresql] / INSTALL
1                     PostgreSQL Installation Instructions
2
3   ------------------------------------------------------------------------
4
5 Short Version
6
7 ./configure
8 gmake
9 su
10 gmake install
11 adduser postgres
12 mkdir /usr/local/pgsql/data
13 chown postgres /usr/local/pgsql/data
14 su - postgres
15 /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
16 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
17 /usr/local/pgsql/bin/createdb test
18 /usr/local/pgsql/bin/psql test
19
20 The long version is the rest of this document.
21
22   ------------------------------------------------------------------------
23
24 Requirements
25
26 In general, a modern Unix-compatible platform should be able to run
27 PostgreSQL. The platforms that had received specific testing at the time of
28 release are listed in the Section called Supported Platforms below. In the
29 "doc" subdirectory of the distribution there are several platform-specific
30 FAQ documents you might wish to consult if you are having trouble.
31
32 The following prerequisites exist for building PostgreSQL:
33
34    * GNU make is required; other make programs will *not* work. GNU make is
35      often installed under the name "gmake"; this document will always refer
36      to it by that name. (On some systems GNU make is the default tool with
37      the name "make".) To test for GNU make enter
38
39      gmake --version
40
41      It is recommended to use version 3.76.1 or later.
42
43    * You need an ISO/ANSI C compiler. Recent versions of GCC are
44      recommendable, but PostgreSQL is known to build with a wide variety of
45      compilers from different vendors.
46
47    * gzip is needed to unpack the distribution in the first place. If you
48      are reading this, you probably already got past that hurdle.
49
50    * The GNU Readline library (for comfortable line editing and command
51      history retrieval) will automatically be used if found. You might wish
52      to install it before proceeding, but it is not essential. (On NetBSD,
53      the "libedit" library is readline-compatible and is used if
54      "libreadline" is not found.)
55
56    * GNU Flex and Bison are needed to build from scratch, but they are *not*
57      required when building from a released source package because
58      pre-generated output files are included in released packages. You will
59      need these programs only when building from a CVS tree or if you
60      changed the actual scanner and parser definition files. If you need
61      them, be sure to get Flex 2.5.4 or later and Bison 1.28 or later. Other
62      yacc programs can sometimes be used, but doing so requires extra effort
63      and is not recommended. Other lex programs will definitely not work.
64
65    * To build on Windows NT or Windows 2000 you need the Cygwin and cygipc
66      packages. See the file "doc/FAQ_MSWIN" for details.
67
68 If you need to get a GNU package, you can find it at your local GNU mirror
69 site (see http://www.gnu.org/order/ftp.html for a list) or at
70 ftp://ftp.gnu.org/gnu/.
71
72 Also check that you have sufficient disk space. You will need about 30 MB
73 for the source tree during compilation and about 10 MB for the installation
74 directory. An empty database cluster takes about 20 MB, databases take about
75 five times the amount of space that a flat text file with the same data
76 would take. If you are going to run the regression tests you will
77 temporarily need an extra 20 MB. Use the "df" command to check for disk
78 space.
79
80   ------------------------------------------------------------------------
81
82 If You Are Upgrading
83
84 The internal data storage format changes with new releases of PostgreSQL.
85 Therefore, if you are upgrading an existing installation that does not have
86 a version number "7.2.x", you must back up and restore your data as shown
87 here. These instructions assume that your existing installation is under the
88 "/usr/local/pgsql" directory, and that the data area is in
89 "/usr/local/pgsql/data". Substitute your paths appropriately.
90
91   1. Make sure that your database is not updated during or after the backup.
92      This does not affect the integrity of the backup, but the changed data
93      would of course not be included. If necessary, edit the permissions in
94      the file "/usr/local/pgsql/data/pg_hba.conf" (or equivalent) to
95      disallow access from everyone except you.
96
97   2. To dump your database installation, type:
98
99      pg_dumpall > outputfile
100
101      If you need to preserve OIDs (such as when using them as foreign keys),
102      then use the "-o" option when running "pg_dumpall".
103
104      "pg_dumpall" does not save large objects. Check the Administrator's
105      Guide if you need to do this.
106
107      Make sure that you use the "pg_dumpall" command from the version you
108      are currently running. 7.2's "pg_dumpall" should not be used on older
109      databases.
110
111   3. If you are installing the new version at the same location as the old
112      one then shut down the old server, at the latest before you install the
113      new files:
114
115      kill -INT `cat /usr/local/pgsql/data/postmaster.pid`
116
117      Versions prior to 7.0 do not have this "postmaster.pid" file. If you
118      are using such a version you must find out the process id of the server
119      yourself, for example by typing "ps ax | grep postmaster", and supply
120      it to the "kill" command.
121
122      On systems that have PostgreSQL started at boot time, there is probably
123      a start-up file that will accomplish the same thing. For example, on a
124      Red Hat Linux system one might find that
125
126      /etc/rc.d/init.d/postgresql stop
127
128      works. Another possibility is "pg_ctl stop".
129
130   4. If you are installing in the same place as the old version then it is
131      also a good idea to move the old installation out of the way, in case
132      you have trouble and need to revert to it. Use a command like this:
133
134      mv /usr/local/pgsql /usr/local/pgsql.old
135
136 After you have installed PostgreSQL 7.2, create a new database directory and
137 start the new server. Remember that you must execute these commands while
138 logged in to the special database user account (which you already have if
139 you are upgrading).
140
141 /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
142 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
143
144 Finally, restore your data with
145
146 /usr/local/pgsql/bin/psql -d template1 -f outputfile
147
148 using the *new* psql.
149
150 You can also install the new version in parallel with the old one to
151 decrease the downtime. These topics are discussed at length in the
152 Administrator's Guide, which you are encouraged to read in any case.
153
154   ------------------------------------------------------------------------
155
156 Installation Procedure
157
158   1. Configuration
159
160      The first step of the installation procedure is to configure the source
161      tree for your system and choose the options you would like. This is
162      done by running the "configure" script. For a default installation
163      simply enter
164
165      ./configure
166
167      This script will run a number of tests to guess values for various
168      system dependent variables and detect some quirks of your operating
169      system, and finally will create several files in the build tree to
170      record what it found.
171
172      The default configuration will build the server and utilities, as well
173      as all client applications and interfaces that require only a C
174      compiler. All files will be installed under "/usr/local/pgsql" by
175      default.
176
177      You can customize the build and installation process by supplying one
178      or more of the following command line options to "configure":
179
180      --prefix=PREFIX
181
182           Install all files under the directory "PREFIX" instead of
183           "/usr/local/pgsql". The actual files will be installed into
184           various subdirectories; no files will ever be installed directly
185           into the "PREFIX" directory.
186
187           If you have special needs, you can also customize the individual
188           subdirectories with the following options.
189
190      --exec-prefix=EXEC-PREFIX
191
192           You can install architecture-dependent files under a different
193           prefix, "EXEC-PREFIX", than what "PREFIX" was set to. This can be
194           useful to share architecture-independent files between hosts. If
195           you omit this, then "EXEC-PREFIX" is set equal to "PREFIX" and
196           both architecture-dependent and independent files will be
197           installed under the same tree, which is probably what you want.
198
199      --bindir=DIRECTORY
200
201           Specifies the directory for executable programs. The default is
202           "EXEC-PREFIX/bin", which normally means "/usr/local/pgsql/bin".
203
204      --datadir=DIRECTORY
205
206           Sets the directory for read-only data files used by the installed
207           programs. The default is "PREFIX/share". Note that this has
208           nothing to do with where your database files will be placed.
209
210      --sysconfdir=DIRECTORY
211
212           The directory for various configuration files, "PREFIX/etc" by
213           default.
214
215      --libdir=DIRECTORY
216
217           The location to install libraries and dynamically loadable
218           modules. The default is "EXEC-PREFIX/lib".
219
220      --includedir=DIRECTORY
221
222           The directory for installing C and C++ header files. The default
223           is "PREFIX/include".
224
225      --docdir=DIRECTORY
226
227           Documentation files, except "man" pages, will be installed into
228           this directory. The default is "PREFIX/doc".
229
230      --mandir=DIRECTORY
231
232           The man pages that come with PostgreSQL will be installed under
233           this directory, in their respective "manx" subdirectories. The
234           default is "PREFIX/man".
235
236           Note: Care has been taken to make it possible to install
237           PostgreSQL into shared installation locations (such as
238           "/usr/local/include") without interfering with the namespace
239           of the rest of the system. First, the string "/postgresql" is
240           automatically appended to datadir, sysconfdir, and docdir,
241           unless the fully expanded directory name already contains the
242           string "postgres" or "pgsql". For example, if you choose
243           "/usr/local" as prefix, the documentation will be installed
244           in "/usr/local/doc/postgresql", but if the prefix is
245           "/opt/postgres", then it will be in "/opt/postgres/doc".
246           Second, the installation layout of the C and C++ header files
247           has been reorganized in the 7.2 release. The public header
248           files of the client interfaces are installed into includedir
249           and are namespace-clean. The internal header files and the
250           server header files are installed into private directories
251           under includedir. See the Programmer's Guide for information
252           about how to get at the header files for each interface.
253           Finally, a private subdirectory will also be created, if
254           appropriate, under libdir for dynamically loadable modules.
255
256      --with-includes=DIRECTORIES
257
258           "DIRECTORIES" is a colon-separated list of directories that will
259           be added to the list the compiler searches for header files. If
260           you have optional packages (such as GNU Readline) installed in a
261           non-standard location, you have to use this option and probably
262           also the corresponding "--with-libraries" option.
263
264           Example: --with-includes=/opt/gnu/include:/usr/sup/include.
265
266      --with-libraries=DIRECTORIES
267
268           "DIRECTORIES" is a colon-separated list of directories to search
269           for libraries. You will probably have to use this option (and the
270           corresponding "--with-includes" option) if you have packages
271           installed in non-standard locations.
272
273           Example: --with-libraries=/opt/gnu/lib:/usr/sup/lib.
274
275      --enable-locale
276
277           Enables locale support. There is a performance penalty associated
278           with locale support, but if you are not in an English-speaking
279           environment you will most likely need this.
280
281      --enable-recode
282
283           Enables single-byte character set recode support. See the
284           Administrator's Guide about this feature.
285
286      --enable-multibyte
287
288           Allows the use of multibyte character encodings (including
289           Unicode) and character set encoding conversion. Read the
290           Administrator's Guide for details.
291
292           Note that some interfaces (such as Tcl or Java) expect all
293           character strings to be in Unicode, so this option will be
294           required to correctly support these interfaces.
295
296      --enable-nls[=LANGUAGES]
297
298           Enables Native Language Support (NLS), that is, the ability to
299           display a program's messages in a language other than English.
300           "LANGUAGES" is a space separated list of codes of the languages
301           that you want supported, for example --enable-nls='de fr'. (The
302           intersection between your list and the set of actually provided
303           translations will be computed automatically.) If you do not
304           specify a list, then all available translations are installed.
305
306           To use this option, you will need an implementation of the gettext
307           API. Some operating systems have this built-in (e.g., Linux,
308           NetBSD, Solaris), for other systems you can download an add-on
309           package from here: http://www.postgresql.org/~petere/gettext.html.
310           If you are using the gettext implementation in the GNU C library
311           then you will additionally need the GNU gettext package for some
312           utility programs. For any of the other implementations you will
313           not need it.
314
315      --with-pgport=NUMBER
316
317           Set "NUMBER" as the default port number for server and clients.
318           The default is 5432. The port can always be changed later on, but
319           if you specify it here then both server and clients will have the
320           same default compiled in, which can be very convenient. Usually
321           the only good reason to select a non-default value is if you
322           intend to run multiple PostgreSQL servers on the same machine.
323
324      --with-CXX
325
326           Build the C++ interface library.
327
328      --with-perl
329
330           Build the Perl interface module. The Perl interface will be
331           installed at the usual place for Perl modules (typically under
332           "/usr/lib/perl"), so you must have root access to perform the
333           installation step (see step 4). You need to have Perl 5 installed
334           to use this option.
335
336      --with-python
337
338           Build the Python interface module. You need to have root access to
339           be able to install the Python module at its default place
340           ("/usr/lib/pythonx.y"). To be able to use this option, you must
341           have Python installed and your system needs to support shared
342           libraries. If you instead want to build a new complete interpreter
343           binary, you will have to do it manually.
344
345      --with-tcl
346
347           Builds components that require Tcl/Tk, which are libpgtcl,
348           pgtclsh, pgtksh, PgAccess, and PL/Tcl. But see below about
349           "--without-tk".
350
351      --without-tk
352
353           If you specify "--with-tcl" and this option, then programs that
354           require Tk (pgtksh and PgAccess) will be excluded.
355
356      --with-tclconfig=DIRECTORY, --with-tkconfig=DIRECTORY
357
358           Tcl/Tk installs the files "tclConfig.sh" and "tkConfig.sh", which
359           contain configuration information needed to build modules
360           interfacing to Tcl or Tk. These files are normally found
361           automatically at their well-known locations, but if you want to
362           use a different version of Tcl or Tk you can specify the directory
363           in which to find them.
364
365      --enable-odbc
366
367           Build the ODBC driver. By default, the driver will be independent
368           of a driver manager. To work better with a driver manager already
369           installed on your system, use one of the following options in
370           addition to this one. More information can be found in the
371           Programmer's Guide.
372
373      --with-iodbc
374
375           Build the ODBC driver for use with iODBC.
376
377      --with-unixodbc
378
379           Build the ODBC driver for use with unixODBC.
380
381      --with-odbcinst=DIRECTORY
382
383           Specifies the directory where the ODBC driver will expect its
384           "odbcinst.ini" configuration file. The default is
385           "/usr/local/pgsql/etc" or whatever you specified as
386           "--sysconfdir". It should be arranged that the driver reads the
387           same file as the driver manager.
388
389           If either the option "--with-iodbc" or the option
390           "--with-unixodbc" is used, this option will be ignored because in
391           that case the driver manager handles the location of the
392           configuration file.
393
394      --with-java
395
396           Build the JDBC driver and associated Java packages. This option
397           requires Ant to be installed (as well as a JDK, of course). Refer
398           to the JDBC driver documentation in the Programmer's Guide for
399           more information.
400
401      --with-krb4[=DIRECTORY], --with-krb5[=DIRECTORY]
402
403           Build with support for Kerberos authentication. You can use either
404           Kerberos version 4 or 5, but not both. The "DIRECTORY" argument
405           specifies the root directory of the Kerberos installation;
406           "/usr/athena" is assumed as default. If the relevant header files
407           and libraries are not under a common parent directory, then you
408           must use the "--with-includes" and "--with-libraries" options in
409           addition to this option. If, on the other hand, the required files
410           are in a location that is searched by default (e.g., "/usr/lib"),
411           then you can leave off the argument.
412
413           "configure" will check for the required header files and libraries
414           to make sure that your Kerberos installation is sufficient before
415           proceeding.
416
417      --with-krb-srvnam=NAME
418
419           The name of the Kerberos service principal. postgres is the
420           default. There's probably no reason to change this.
421
422      --with-openssl[=DIRECTORY]
423
424           Build with support for SSL (encrypted) connections. This requires
425           the OpenSSL package to be installed. The "DIRECTORY" argument
426           specifies the root directory of the OpenSSL installation; the
427           default is "/usr/local/ssl".
428
429           "configure" will check for the required header files and libraries
430           to make sure that your OpenSSL installation is sufficient before
431           proceeding.
432
433      --with-pam
434
435           Build with PAM (Pluggable Authentication Modules) support.
436
437      --enable-syslog
438
439           Enables the PostgreSQL server to use the syslog logging facility.
440           (Using this option does not mean that you must log with syslog or
441           even that it will be done by default, it simply makes it possible
442           to turn that option on at run time.)
443
444      --enable-debug
445
446           Compiles all programs and libraries with debugging symbols. This
447           means that you can run the programs through a debugger to analyze
448           problems. This enlarges the size of the installed executables
449           considerably, and on non-GCC compilers it usually also disables
450           compiler optimization, causing slowdowns. However, having the
451           symbols available is extremely helpful for dealing with any
452           problems that may arise. Currently, this option is recommended for
453           production installations only if you use GCC. But you should
454           always have it on if you are doing development work or running a
455           beta version.
456
457      --enable-cassert
458
459           Enables assertion checks in the server, which test for many "can't
460           happen" conditions. This is invaluable for code development
461           purposes, but the tests slow things down a little. Also, having
462           the tests turned on won't necessarily enhance the stability of
463           your server! The assertion checks are not categorized for
464           severity, and so what might be a relatively harmless bug will
465           still lead to server restarts if it triggers an assertion failure.
466           Currently, this option is not recommended for production use, but
467           you should have it on for development work or when running a beta
468           version.
469
470      --enable-depend
471
472           Enables automatic dependency tracking. With this option, the
473           makefiles are set up so that all affected object files will be
474           rebuilt when any header file is changed. This is useful if you are
475           doing development work, but is just wasted overhead if you intend
476           only to compile once and install. At present, this option will
477           work only if you use GCC.
478
479      If you prefer a C or C++ compiler different from the one "configure"
480      picks then you can set the environment variables CC or CXX,
481      respectively, to the program of your choice. Similarly, you can
482      override the default compiler flags with the CFLAGS and CXXFLAGS
483      variables. For example:
484
485      env CC=/opt/bin/gcc CFLAGS='-O2 -pipe' ./configure
486
487   2. Build
488
489      To start the build, type
490
491      gmake
492
493      (Remember to use GNU make.) The build may take anywhere from 5 minutes
494      to half an hour depending on your hardware. The last line displayed
495      should be
496
497      All of PostgreSQL is successfully made. Ready to install.
498
499   3. Regression Tests
500
501      If you want to test the newly built server before you install it, you
502      can run the regression tests at this point. The regression tests are a
503      test suite to verify that PostgreSQL runs on your machine in the way
504      the developers expected it to. Type
505
506      gmake check
507
508      (This won't work as root; do it as an unprivileged user.) It is
509      possible that some tests fail, due to differences in error message
510      wording or floating point results. The file "src/test/regress/README"
511      and the Administrator's Guide contain detailed information about
512      interpreting the test results. You can repeat this test at any later
513      time by issuing the same command.
514
515   4. Installing The Files
516
517           Note: If you are upgrading an existing system and are going
518           to install the new files over the old ones, then you should
519           have backed up your data and shut down the old server by now,
520           as explained in the Section called If You Are Upgrading
521           above.
522
523      To install PostgreSQL enter
524
525      gmake install
526
527      This will install files into the directories that were specified in
528      step 1. Make sure that you have appropriate permissions to write into
529      that area. Normally you need to do this step as root. Alternatively,
530      you could create the target directories in advance and arrange for
531      appropriate permissions to be granted.
532
533      If you built the Perl or Python interfaces and you were not the root
534      user when you executed the above command then that part of the
535      installation probably failed. In that case you should become the root
536      user and then do
537
538      gmake -C src/interfaces/perl5 install
539      gmake -C src/interfaces/python install
540
541      If you do not have superuser access you are on your own: you can still
542      take the required files and place them in other directories where Perl
543      or Python can find them, but how to do that is left as an exercise.
544
545      The standard installation provides only the header files needed for
546      client application development. If you plan to do any server-side
547      program development (such as custom functions or data types written in
548      C), then you may want to install the entire PostgreSQL include tree
549      into your target include directory. To do that, enter
550
551      gmake install-all-headers
552
553      This adds a megabyte or two to the installation footprint, and is only
554      useful if you don't plan to keep the whole source tree around for
555      reference. (If you do, you can just use the source's include directory
556      when building server-side software.)
557
558      Client-only installation: If you want to install only the client
559      applications and interface libraries, then you can use these commands:
560
561      gmake -C src/bin install
562      gmake -C src/include install
563      gmake -C src/interfaces install
564      gmake -C doc install
565
566      To undo the installation use the command "gmake uninstall". However,
567      this will not remove any created directories.
568
569 After the installation you can make room by removing the built files from
570 the source tree with the "gmake clean" command. This will preserve the files
571 made by the configure program, so that you can rebuild everything with
572 "gmake" later on. To reset the source tree to the state in which it was
573 distributed, use "gmake distclean". If you are going to build for several
574 platforms from the same source tree you must do this and re-configure for
575 each build.
576
577 If you perform a build and then discover that your configure options were
578 wrong, or if you change anything that configure investigates (for example,
579 you install GNU Readline), then it's a good idea to do "gmake distclean"
580 before reconfiguring and rebuilding. Without this, your changes in
581 configuration choices may not propagate everywhere they need to.
582
583   ------------------------------------------------------------------------
584
585 Post-Installation Setup
586
587 Shared Libraries
588
589 On some systems that have shared libraries (which most systems do) you need
590 to tell your system how to find the newly installed shared libraries. The
591 systems on which this is *not* necessary include BSD/OS, FreeBSD, HP-UX,
592 IRIX, Linux, NetBSD, OpenBSD, Tru64 UNIX (formerly Digital UNIX), and
593 Solaris.
594
595 The method to set the shared library search path varies between platforms,
596 but the most widely usable method is to set the environment variable
597 LD_LIBRARY_PATH like so: In Bourne shells ("sh", "ksh", "bash", "zsh")
598
599 LD_LIBRARY_PATH=/usr/local/pgsql/lib
600 export LD_LIBRARY_PATH
601
602 or in "csh" or "tcsh"
603
604 setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
605
606 Replace /usr/local/pgsql/lib with whatever you set "--libdir" to in step 1.
607 You should put these commands into a shell start-up file such as
608 "/etc/profile" or "~/.bash_profile". Some good information about the caveats
609 associated with this method can be found at
610 http://www.visi.com/~barr/ldpath.html.
611
612 On some systems it might be preferable to set the environment variable
613 LD_RUN_PATH *before* building.
614
615 If in doubt, refer to the manual pages of your system (perhaps "ld.so" or
616 "rld"). If you later on get a message like
617
618 psql: error in loading shared libraries
619 libpq.so.2.1: cannot open shared object file: No such file or directory
620
621 then this step was necessary. Simply take care of it then.
622
623 If you are on BSD/OS, Linux, or SunOS 4 and you have root access you can run
624
625 /sbin/ldconfig /usr/local/pgsql/lib
626
627 (or equivalent directory) after installation to enable the run-time linker
628 to find the shared libraries faster. Refer to the manual page of "ldconfig"
629 for more information. On FreeBSD, NetBSD, and OpenBSD the command is
630
631 /sbin/ldconfig -m /usr/local/pgsql/lib
632
633 instead. Other systems are not known to have an equivalent command.
634
635   ------------------------------------------------------------------------
636
637 Environment Variables
638
639 If you installed into "/usr/local/pgsql" or some other location that is not
640 searched for programs by default, you need to add "/usr/local/pgsql/bin" (or
641 whatever you set "--bindir" to in step 1) into your PATH. To do this, add
642 the following to your shell start-up file, such as "~/.bash_profile" (or
643 "/etc/profile", if you want it to affect every user):
644
645 PATH=/usr/local/pgsql/bin:$PATH
646
647 If you are using "csh" or "tcsh", then use this command:
648
649 set path = ( /usr/local/pgsql/bin $path )
650
651 To enable your system to find the man documentation, you need to add a line
652 like the following to a shell start-up file:
653
654 MANPATH=/usr/local/pgsql/man:$MANPATH
655
656 The environment variables PGHOST and PGPORT specify to client applications
657 the host and port of the database server, overriding the compiled-in
658 defaults. If you are going to run client applications remotely then it is
659 convenient if every user that plans to use the database sets PGHOST. This is
660 not required, however: the settings can be communicated via command line
661 options to most client programs.
662
663   ------------------------------------------------------------------------
664
665 Getting Started
666
667 The following is a quick summary of how to get PostgreSQL up and running
668 once installed. The Administrator's Guide contains more information.
669
670   1. Create a user account for the PostgreSQL server. This is the user the
671      server will run as. For production use you should create a separate,
672      unprivileged account ("postgres" is commonly used). If you do not have
673      root access or just want to play around, your own user account is
674      enough, but running the server as root is a security risk and will not
675      work.
676
677      adduser postgres
678
679   2. Create a database installation with the "initdb" command. To run
680      "initdb" you must be logged in to your PostgreSQL server account. It
681      will not work as root.
682
683      root# mkdir /usr/local/pgsql/data
684      root# chown postgres /usr/local/pgsql/data
685      root# su - postgres
686      postgres$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
687
688      The "-D" option specifies the location where the data will be stored.
689      You can use any path you want, it does not have to be under the
690      installation directory. Just make sure that the server account can
691      write to the directory (or create it, if it doesn't already exist)
692      before starting "initdb", as illustrated here.
693
694   3. The previous step should have told you how to start up the database
695      server. Do so now. The command should look something like
696
697      /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
698
699      This will start the server in the foreground. To put the server in the
700      background use something like
701
702      nohup /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data \
703          </dev/null >>server.log 2>&1 </dev/null &
704
705      To stop a server running in the background you can type
706
707      kill `cat /usr/local/pgsql/data/postmaster.pid`
708
709      In order to allow TCP/IP connections (rather than only Unix domain
710      socket ones) you need to pass the "-i" option to "postmaster".
711
712   4. Create a database:
713
714      createdb testdb
715
716      Then enter
717
718      psql testdb
719
720      to connect to that database. At the prompt you can enter SQL commands
721      and start experimenting.
722
723   ------------------------------------------------------------------------
724
725 What Now?
726
727    * The PostgreSQL distribution contains a comprehensive documentation set,
728      which you should read sometime. After installation, the documentation
729      can be accessed by pointing your browser to
730      "/usr/local/pgsql/doc/html/index.html", unless you changed the
731      installation directories.
732
733      The Tutorial should be your first reading if you are completely new to
734      SQL databases. If you are familiar with database concepts then you want
735      to proceed with the Administrator's Guide, which contains information
736      about how to set up the database server, database users, and
737      authentication.
738
739    * Usually, you will want to modify your computer so that it will
740      automatically start the database server whenever it boots. Some
741      suggestions for this are in the Administrator's Guide.
742
743    * Run the regression tests against the installed server (using the
744      sequential test method). If you didn't run the tests before
745      installation, you should definitely do it now. This is also explained
746      in the Administrator's Guide.
747
748   ------------------------------------------------------------------------
749
750 Supported Platforms
751
752 PostgreSQL has been verified by the developer community to work on the
753 platforms listed below. A supported platform generally means that PostgreSQL
754 builds and installs according to these instructions and that the regression
755 tests pass.
756
757      Note: If you are having problems with the installation on a
758      supported platform, please write to <pgsql-bugs@postgresql.org> or
759      <pgsql-ports@postgresql.org>, not to the people listed here.
760
761  OS     Processor   Version Reported                         Remarks
762  AIX    RS6000      7.2     2001-12-19, Andreas Zeugswetter  see also
763                             (<ZeugswetterA@spardat.at>),     doc/FAQ_AIX
764                             Tatsuo Ishii
765                             (<t-ishii@sra.co.jp>)
766  BeOS   x86         7.2     2001-11-29, Cyril Velter         5.0.4
767                             (<cyril.velter@libertysurf.fr>)
768  BSD/OS x86         7.2     2001-11-27, Bruce Momjian        4.2
769                             (<pgman@candle.pha.pa.us>)
770  FreeBSDAlpha       7.2     2001-12-18, Chris Kings-Lynne
771                             (<chriskl@familyhealth.com.au>)
772  FreeBSDx86         7.2     2001-11-14, Chris Kings-Lynne
773                             (<chriskl@familyhealth.com.au>)
774  HP-UX  PA-RISC     7.2     2001-11-29, Joseph Conway        11.00 and 10.20;
775                             (<Joseph.Conway@home.com>), Tom  see also
776                             Lane (<tgl@sss.pgh.pa.us>)       doc/FAQ_HPUX
777  IRIX   MIPS        7.2     2001-11-28, Luis Amigo           6.5.13, MIPSPro
778                             (<lamigo@atc.unican.es>)         7.30
779  Linux  Alpha       7.2     2001-11-16, Tom Lane             2.2.18; tested at
780                             (<tgl@sss.pgh.pa.us>)            SourceForge
781  Linux  armv4l      7.2     2001-12-10, Mark Knox            2.2.x
782                             (<segfault@hardline.org>)
783  Linux  MIPS        7.2     2001-11-15, Hisao Shibuya        2.0.x; Cobalt
784                             (<shibuya@alpha.or.jp>)          Qube2
785  Linux  PlayStation 7.2     2001-12-12, Permaine Cheung      #undef
786         2                   <pcheung@redhat.com>)            HAS_TEST_AND_SET,
787                                                              slock_t
788  Linux  PPC74xx     7.2     2001-11-16, Tom Lane             2.2.18; Apple G3
789                             (<tgl@sss.pgh.pa.us>)
790  Linux  S/390       7.2     2001-12-12, Permaine Cheung
791                             <pcheung@redhat.com>)
792  Linux  Sparc       7.2     2001-11-28, Doug McNaught        2.2.19
793                             (<doug@wireboard.com>)
794  Linux  x86         7.2     2001-11-15, Thomas Lockhart      2.0.x, 2.2.x,
795                             (<lockhart@fourpalms.org>)       2.4.x
796  MacOS XPPC         7.2     2001-11-28, Gavin Sherry         10.1.x
797                             (<swm@linuxworld.com.au>)
798  NetBSD Alpha       7.2     2001-11-20, Thomas Thai          1.5W
799                             (<tom@minnesota.com>)
800  NetBSD arm32       7.1     2001-03-21, Patrick Welche       1.5E
801                             (<prlw1@cam.ac.uk>)
802  NetBSD m68k        7.0     2000-04-10, Henry B. Hotz        Mac 8xx
803                             (<hotz@jpl.nasa.gov>)
804  NetBSD PPC         7.2     2001-11-28, Bill Studenmund      1.5
805                             (<wrstuden@netbsd.org>)
806  NetBSD Sparc       7.2     2001-12-03, Matthew Green        32- and 64-bit
807                             (<mrg@eterna.com.au>)            builds
808  NetBSD VAX         7.1     2001-03-30, Tom I. Helbekkmo     1.5
809                             (<tih@kpnQwest.no>)
810  NetBSD x86         7.2     2001-11-28, Bill Studenmund      1.5
811                             (<wrstuden@netbsd.org>)
812  OpenBSDSparc       7.2     2001-11-27, Brandon Palmer       3.0
813                             (<bpalmer@crimelabs.net>)
814  OpenBSDx86         7.2     2001-11-26, Brandon Palmer       3.0
815                             (<bpalmer@crimelabs.net>)
816  Open   x86         7.2     2001-11-28, OU-8 Larry Rosenman  see also
817  UNIX                       (<ler@lerctr.org>), UW-7 Olivier doc/FAQ_SCO
818                             Prenant (<ohp@pyrenet.fr>)
819  QNX 4  x86         7.2     2001-12-10, Bernd Tegge          4.25; see also
820  RTOS                       (<tegge@repas-aeg.de>)           doc/FAQ_QNX4
821  SolarisSparc       7.2     2001-11-12, Andrew Sullivan      2.6-8; see also
822                             (<andrew@libertyrms.com>)        doc/FAQ_Solaris
823  Solarisx86         7.2     2001-11-28, Martin Renters       2.8; see also
824                             (<martin@datafax.com>)           doc/FAQ_Solaris
825  SunOS 4Sparc       7.2     2001-12-04, Tatsuo Ishii
826                             (<t-ishii@sra.co.jp>)
827  Tru64  Alpha       7.2     2001-11-26, Alessio Bragadini    5.0; 4.0g with cc
828  UNIX                       (<alessio@albourne.com>), Bernd  and gcc
829                             Tegge (<tegge@repas-aeg.de>)
830  Windowsx86         7.2     2001-12-13, Dave Page            with Cygwin; see
831                             (<dpage@vale-housing.co.uk>),    doc/FAQ_MSWIN
832                             Jason Tishler
833                             (<jason@tishler.net>)
834  Windowsx86         7.2     2001-12-10, Dave Page            native is
835                             (<dpage@vale-housing.co.uk>)     client-side only;
836                                                              see
837                                                              Administrator's
838                                                              Guide
839
840 Unsupported Platforms: The following platforms are either known not to work,
841 or they used to work in a previous release and we did not receive explicit
842 confirmation of a successful test with version 7.2 at the time this list was
843 compiled. We include these here to let you know that these platforms *could*
844 be supported if given some attention.
845
846  OS         Processor Version Reported                         Remarks
847  DG/UX      m88k      6.3     1998-03-01, Brian E Gallew       no recent
848  5.4R4.11                     (<geek+@cmu.edu>)                reports
849  MkLinux DR1PPC750    7.0     2001-04-03, Tatsuo Ishii         7.1 needs OS
850                               (<t-ishii@sra.co.jp>)            update?
851  NeXTSTEP   x86       6.x     1998-03-01, David Wetzel         bit rot
852                               (<dave@turbocat.de>)             suspected
853  QNX RTOS v6x86       7.2     2001-11-20, Igor Kovalenko       patches
854                               (<Igor.Kovalenko@motorola.com>)  available in
855                                                                archives,
856                                                                but too late
857                                                                for 7.2
858  SCO        x86       6.5     1999-05-25, Andrew Merrill       7.2 should
859  OpenServer                   (<andrew@compclass.com>)         work, but no
860  5                                                             reports; see
861                                                                also
862                                                                doc/FAQ_SCO
863  System V R4m88k      6.2.1   1998-03-01, Doug Winterburn      needs new
864                               (<dlw@seavme.xroads.com>)        TAS spinlock
865                                                                code
866  System V R4MIPS      6.4     1998-10-28, Frank Ridderbusch    no recent
867                               (<ridderbusch.pad@sni.de>)       reports
868  Ultrix     MIPS      7.1     2001-03-26                       TAS spinlock
869                                                                code not
870                                                                detected
871  Ultrix     VAX       6.x     1998-03-01