1- <!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.73 2002/01/09 00:52:37 petere Exp $ -->
1+ <!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.74 2002/01/20 05:45:18 tgl Exp $ -->
22
33<chapter id="installation">
44 <title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -39,7 +39,7 @@ su - postgres
3939 <para>
4040 In general, a modern Unix-compatible platform should be able to run
4141 <productname>PostgreSQL</>.
42- The platforms that had received explicit testing at the
42+ The platforms that had received specific testing at the
4343 time of release are listed in <xref linkend="supported-platforms">
4444 below. In the <filename>doc</> subdirectory of the distribution
4545 there are several platform-specific <acronym>FAQ</> documents you
@@ -79,7 +79,11 @@ su - postgres
7979 </listitem>
8080
8181 <listitem>
82- <para><application>gzip</></para>
82+ <para>
83+ <application>gzip</> is needed to unpack the distribution in the
84+ first place. If you are reading this, you probably already got
85+ past that hurdle.
86+ </para>
8387 </listitem>
8488
8589 <listitem>
@@ -88,10 +92,10 @@ su - postgres
8892 <primary>readline</primary>
8993 </indexterm>
9094
91- The <acronym>GNU</> <productname>Readline</> library for comfortable
92- line editing and command history retrieval will automatically be used
95+ The <acronym>GNU</> <productname>Readline</> library ( for comfortable
96+ line editing and command history retrieval) will automatically be used
9397 if found. You might wish to install it before proceeding, but it is not
94- required . (On <productname>NetBSD</productname>, the
98+ essential . (On <productname>NetBSD</productname>, the
9599 <filename>libedit</filename> library is
96100 <productname>readline</productname>-compatible and is used if
97101 <filename>libreadline</filename> is not found.)
@@ -110,15 +114,17 @@ su - postgres
110114 <primary>yacc</primary>
111115 </indexterm>
112116
113- <application>Flex</> and <application>Bison</> are
117+ <acronym>GNU</> <application>Flex</> and <application>Bison</> are
118+ needed to build from scratch, but they are
114119 <emphasis>not</> required when building from a released source
115- package because the output files are pre-generated. You will
116- need these programs only when building from a CVS tree or when
117- the actual scanner and parser definition files were changed. If
120+ package because pre-generated output files are included in released
121+ packages. You will
122+ need these programs only when building from a CVS tree or if you
123+ changed the actual scanner and parser definition files. If
118124 you need them, be sure to get <application>Flex</> 2.5.4 or
119125 later and <application>Bison</> 1.28 or later. Other <application>yacc</>
120126 programs can sometimes be used, but doing so requires extra
121- efforts and is not recommended. Other <application>lex</> programs will
127+ effort and is not recommended. Other <application>lex</> programs will
122128 definitely not work.
123129 </para>
124130 </listitem>
@@ -220,9 +226,13 @@ su - postgres
220226<screen>
221227<userinput>pg_dumpall > <replaceable>outputfile</></userinput>
222228</screen>
223- If you need to preserve the OIDs (such as when using them as
229+ If you need to preserve OIDs (such as when using them as
224230 foreign keys), then use the <option>-o</option> option when running
225- <command>pg_dumpall</>. <command>pg_dumpall</command> does not
231+ <command>pg_dumpall</>.
232+ </para>
233+
234+ <para>
235+ <command>pg_dumpall</command> does not
226236 save large objects. Check
227237 <![%standalone-include[the <citetitle>Administrator's Guide</>]]>
228238 <![%standalone-ignore[<xref linkend="backup-dump-caveats">]]>
@@ -258,15 +268,16 @@ su - postgres
258268<screen>
259269<userinput>/etc/rc.d/init.d/postgresql stop</userinput>
260270</screen>
261- works.
271+ works. Another possibility is <userinput>pg_ctl stop</>.
262272 </para>
263273 </step>
264274
265275 <step>
266276 <para>
267277 If you are installing in the same place as the old version then
268278 it is also a good idea to move the old installation out of the
269- way, in case you still need it later on. Use a command like this:
279+ way, in case you have trouble and need to revert to it.
280+ Use a command like this:
270281<screen>
271282<userinput>mv /usr/local/pgsql /usr/local/pgsql.old</>
272283</screen>
@@ -323,13 +334,13 @@ su - postgres
323334</screen>
324335 This script will run a number of tests to guess values for various
325336 system dependent variables and detect some quirks of your
326- operating system, and finally creates several files in the build
337+ operating system, and finally will create several files in the build
327338 tree to record what it found.
328339 </para>
329340
330341 <para>
331342 The default configuration will build the server and utilities, as
332- well as all client applications and interfaces that only require a
343+ well as all client applications and interfaces that require only a
333344 C compiler. All files will be installed under
334345 <filename>/usr/local/pgsql</> by default.
335346 </para>
@@ -493,8 +504,9 @@ su - postgres
493504 <replaceable>DIRECTORIES</> is a colon-separated list of
494505 directories that will be added to the list the compiler
495506 searches for header files. If you have optional packages
496- (such as GNU <application>Readline</>) installed in a non-standard location
497- you have to use this option and probably the corresponding
507+ (such as GNU <application>Readline</>) installed in a non-standard
508+ location,
509+ you have to use this option and probably also the corresponding
498510 <option>--with-libraries</> option.
499511 </para>
500512 <para>
@@ -565,13 +577,13 @@ su - postgres
565577 <listitem>
566578 <para>
567579 Enables Native Language Support (<acronym>NLS</acronym>), that is, the ability
568- to display a program's message in a language other than
580+ to display a program's messages in a language other than
569581 English. <replaceable>LANGUAGES</replaceable> is a space
570582 separated list of codes of the languages that you want
571583 supported, for example <literal>--enable-nls='de fr'</>.
572584 (The intersection between your list and the set
573585 of actually provided translations will be computed
574- automatically.) If you do not specify it , then all available
586+ automatically.) If you do not specify a list , then all available
575587 translations are installed.
576588 </para>
577589
@@ -607,7 +619,9 @@ su - postgres
607619 server and clients. The default is 5432. The port can always
608620 be changed later on, but if you specify it here then both
609621 server and clients will have the same default compiled in,
610- which can be very convenient.
622+ which can be very convenient. Usually the only good reason
623+ to select a non-default value is if you intend to run multiple
624+ <productname>PostgreSQL</> servers on the same machine.
611625 </para>
612626 </listitem>
613627 </varlistentry>
@@ -682,12 +696,12 @@ su - postgres
682696 <listitem>
683697 <para>
684698 Tcl/Tk installs the files <filename>tclConfig.sh</filename> and
685- <filename>tkConfig.sh</filename> which contain certain
686- configuration information that is needed to build modules
699+ <filename>tkConfig.sh</filename>, which contain
700+ configuration information needed to build modules
687701 interfacing to Tcl or Tk. These files are normally found
688- automatically at their well-known location , but if you want to
702+ automatically at their well-known locations , but if you want to
689703 use a different version of Tcl or Tk you can specify the
690- directory where to find them.
704+ directory in which to find them.
691705 </para>
692706 </listitem>
693707 </varlistentry>
@@ -744,6 +758,21 @@ su - postgres
744758 </listitem>
745759 </varlistentry>
746760
761+ <varlistentry>
762+ <term><option>--with-java</option></term>
763+ <listitem>
764+ <para>
765+ Build the <acronym>JDBC</acronym> driver and associated Java
766+ packages. This option requires
767+ <application>Ant</application> to be installed (as well as a
768+ <acronym>JDK</acronym>, of course). Refer to the
769+ <acronym>JDBC</acronym> driver documentation in the
770+ <citetitle>Programmer's Guide</citetitle> for more
771+ information.
772+ </para>
773+ </listitem>
774+ </varlistentry>
775+
747776 <varlistentry>
748777 <term><option>--with-krb4<optional>=<replaceable>DIRECTORY</></></option></term>
749778 <term><option>--with-krb5<optional>=<replaceable>DIRECTORY</></></option></term>
@@ -754,7 +783,7 @@ su - postgres
754783 <replaceable>DIRECTORY</> argument specifies the root
755784 directory of the Kerberos installation;
756785 <filename>/usr/athena</> is assumed as default. If the
757- relevant headers files and libraries are not under a common
786+ relevant header files and libraries are not under a common
758787 parent directory, then you must use the
759788 <option>--with-includes</> and <option>--with-libraries</>
760789 options in addition to this option. If, on the other hand,
@@ -807,16 +836,11 @@ su - postgres
807836 </varlistentry>
808837
809838 <varlistentry>
810- <term><option>--with-java </option></term>
839+ <term><option>--with-pam </option></term>
811840 <listitem>
812841 <para>
813- Build the <acronym>JDBC</acronym> driver and associated Java
814- packages. This option requires
815- <application>Ant</application> to be installed (as well as a
816- <acronym>JDK</acronym>, of course). Refer to the
817- <acronym>JDBC</acronym> driver documentation in the
818- <citetitle>Programmer's Guide</citetitle> for more
819- information.
842+ Build with <acronym>PAM</> (Pluggable Authentication Modules)
843+ support.
820844 </para>
821845 </listitem>
822846 </varlistentry>
@@ -828,7 +852,7 @@ su - postgres
828852 Enables the <productname>PostgreSQL</> server to use the
829853 <systemitem>syslog</> logging facility. (Using this option does not mean
830854 that you must log with <systemitem>syslog</> or even that it will be done
831- by default, it simply makes it possible to turn this option
855+ by default, it simply makes it possible to turn that option
832856 on at run time.)
833857 </para>
834858 </listitem>
@@ -846,7 +870,7 @@ su - postgres
846870 having the symbols available is extremely helpful for dealing
847871 with any problems that may arise. Currently, this option is
848872 recommended for production installations only if you use GCC.
849- But you should have it on if you are doing development work
873+ But you should always have it on if you are doing development work
850874 or running a beta version.
851875 </para>
852876 </listitem>
@@ -869,18 +893,33 @@ su - postgres
869893 </para>
870894 </listitem>
871895 </varlistentry>
896+
897+ <varlistentry>
898+ <term><option>--enable-depend</option></term>
899+ <listitem>
900+ <para>
901+ Enables automatic dependency tracking. With this option, the
902+ makefiles are set up so that all affected object files will
903+ be rebuilt when any header file is changed. This is useful
904+ if you are doing development work, but is just wasted overhead
905+ if you intend only to compile once and install. At present,
906+ this option will work only if you use GCC.
907+ </para>
908+ </listitem>
909+ </varlistentry>
910+
872911 </variablelist>
873912 </para>
874913
875914 <para>
876915 If you prefer a C or C++ compiler different from the one
877916 <filename>configure</filename> picks then you can set the
878- environment variables <envar>CC</> and <envar>CXX</envar>,
917+ environment variables <envar>CC</> or <envar>CXX</envar>,
879918 respectively, to the program of your choice. Similarly, you can
880919 override the default compiler flags with the <envar>CFLAGS</envar>
881920 and <envar>CXXFLAGS</envar> variables. For example:
882921<screen>
883- <userinput>env CC=/opt/bin/gcc CFLAGS='-02 -pipe' ./configure</>
922+ <userinput>env CC=/opt/bin/gcc CFLAGS='-O2 -pipe' ./configure</>
884923</screen>
885924 </para>
886925 </step>
@@ -894,8 +933,8 @@ su - postgres
894933<userinput>gmake</userinput>
895934</screen>
896935 (Remember to use <acronym>GNU</> <application>make</>.) The build
897- can take anywhere from 5 minutes to half an hour. The last line
898- displayed should be
936+ may take anywhere from 5 minutes to half an hour depending on your
937+ hardware. The last line displayed should be
899938<screen>
900939All of PostgreSQL is successfully made. Ready to install.
901940</screen>
@@ -936,7 +975,7 @@ All of PostgreSQL is successfully made. Ready to install.
936975 <note>
937976 <para>
938977 If you are upgrading an existing system and are going to install
939- the new files over the old ones then you should have backed up
978+ the new files over the old ones, then you should have backed up
940979 your data and shut down the old server by now, as explained in
941980 <xref linkend="install-upgrading"> above.
942981 </para>
@@ -971,7 +1010,7 @@ All of PostgreSQL is successfully made. Ready to install.
9711010 </para>
9721011
9731012 <para>
974- The standard installation contains only the header files needed for client
1013+ The standard installation provides only the header files needed for client
9751014 application development. If you plan to do any server-side program
9761015 development (such as custom functions or data types written in C),
9771016 then you may want to install the entire <productname>PostgreSQL</>
@@ -1001,22 +1040,31 @@ All of PostgreSQL is successfully made. Ready to install.
10011040
10021041 <para>
10031042 To undo the installation use the command <command>gmake
1004- uninstall</>. However, this will not remove any directories.
1043+ uninstall</>. However, this will not remove any created directories.
10051044 </para>
10061045 </step>
10071046 </procedure>
10081047
10091048 <para>
10101049 After the installation you can make room by removing the built
10111050 files from the source tree with the <command>gmake clean</>
1012- command. This will preserve the choices made by the configure
1051+ command. This will preserve the files made by the configure
10131052 program, so that you can rebuild everything with <command>gmake</>
10141053 later on. To reset the source tree to the state in which it was
10151054 distributed, use <command>gmake distclean</>. If you are going to
10161055 build for several platforms from the same source tree you must do
10171056 this and re-configure for each build.
10181057 </para>
10191058
1059+ <para>
1060+ If you perform a build and then discover that your configure options
1061+ were wrong, or if you change anything that configure investigates
1062+ (for example, you install GNU <application>Readline</>), then it's
1063+ a good idea to do <command>gmake distclean</> before reconfiguring
1064+ and rebuilding. Without this, your changes in configuration choices
1065+ may not propagate everywhere they need to.
1066+ </para>
1067+
10201068 </sect1>
10211069
10221070 <sect1 id="install-post">
@@ -1127,7 +1175,7 @@ libpq.so.2.1: cannot open shared object file: No such file or directory
11271175 <para>
11281176 If you installed into <filename>/usr/local/pgsql</> or some other
11291177 location that is not searched for programs by default, you need to
1130- add <filename>/usr/local/pgsql/bin</> (or what you set
1178+ add <filename>/usr/local/pgsql/bin</> (or whatever you set
11311179 <option><literal>--bindir</></> to in <xref linkend="configure">)
11321180 into your <envar>PATH</>. To do this, add the following to your
11331181 shell start-up file, such as <filename>~/.bash_profile</> (or
@@ -1159,8 +1207,8 @@ MANPATH=/usr/local/pgsql/man:$MANPATH
11591207 specify to client applications the host and port of the database
11601208 server, overriding the compiled-in defaults. If you are going to
11611209 run client applications remotely then it is convenient if every
1162- user that plans to use the database sets <envar>PGHOST</>, but it
1163- is not required and the settings can be communicated via command
1210+ user that plans to use the database sets <envar>PGHOST</>. This
1211+ is not required, however: the settings can be communicated via command
11641212 line options to most client programs.
11651213 </para>
11661214 </sect2>
0 commit comments