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 $ -->
2
2
3
3
<chapter id="installation">
4
4
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -39,7 +39,7 @@ su - postgres
39
39
<para>
40
40
In general, a modern Unix-compatible platform should be able to run
41
41
<productname>PostgreSQL</>.
42
- The platforms that had received explicit testing at the
42
+ The platforms that had received specific testing at the
43
43
time of release are listed in <xref linkend="supported-platforms">
44
44
below. In the <filename>doc</> subdirectory of the distribution
45
45
there are several platform-specific <acronym>FAQ</> documents you
@@ -79,7 +79,11 @@ su - postgres
79
79
</listitem>
80
80
81
81
<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>
83
87
</listitem>
84
88
85
89
<listitem>
@@ -88,10 +92,10 @@ su - postgres
88
92
<primary>readline</primary>
89
93
</indexterm>
90
94
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
93
97
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
95
99
<filename>libedit</filename> library is
96
100
<productname>readline</productname>-compatible and is used if
97
101
<filename>libreadline</filename> is not found.)
@@ -110,15 +114,17 @@ su - postgres
110
114
<primary>yacc</primary>
111
115
</indexterm>
112
116
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
114
119
<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
118
124
you need them, be sure to get <application>Flex</> 2.5.4 or
119
125
later and <application>Bison</> 1.28 or later. Other <application>yacc</>
120
126
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
122
128
definitely not work.
123
129
</para>
124
130
</listitem>
@@ -220,9 +226,13 @@ su - postgres
220
226
<screen>
221
227
<userinput>pg_dumpall > <replaceable>outputfile</></userinput>
222
228
</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
224
230
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
226
236
save large objects. Check
227
237
<![%standalone-include[the <citetitle>Administrator's Guide</>]]>
228
238
<![%standalone-ignore[<xref linkend="backup-dump-caveats">]]>
@@ -258,15 +268,16 @@ su - postgres
258
268
<screen>
259
269
<userinput>/etc/rc.d/init.d/postgresql stop</userinput>
260
270
</screen>
261
- works.
271
+ works. Another possibility is <userinput>pg_ctl stop</>.
262
272
</para>
263
273
</step>
264
274
265
275
<step>
266
276
<para>
267
277
If you are installing in the same place as the old version then
268
278
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:
270
281
<screen>
271
282
<userinput>mv /usr/local/pgsql /usr/local/pgsql.old</>
272
283
</screen>
@@ -323,13 +334,13 @@ su - postgres
323
334
</screen>
324
335
This script will run a number of tests to guess values for various
325
336
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
327
338
tree to record what it found.
328
339
</para>
329
340
330
341
<para>
331
342
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
333
344
C compiler. All files will be installed under
334
345
<filename>/usr/local/pgsql</> by default.
335
346
</para>
@@ -493,8 +504,9 @@ su - postgres
493
504
<replaceable>DIRECTORIES</> is a colon-separated list of
494
505
directories that will be added to the list the compiler
495
506
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
498
510
<option>--with-libraries</> option.
499
511
</para>
500
512
<para>
@@ -565,13 +577,13 @@ su - postgres
565
577
<listitem>
566
578
<para>
567
579
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
569
581
English. <replaceable>LANGUAGES</replaceable> is a space
570
582
separated list of codes of the languages that you want
571
583
supported, for example <literal>--enable-nls='de fr'</>.
572
584
(The intersection between your list and the set
573
585
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
575
587
translations are installed.
576
588
</para>
577
589
@@ -607,7 +619,9 @@ su - postgres
607
619
server and clients. The default is 5432. The port can always
608
620
be changed later on, but if you specify it here then both
609
621
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.
611
625
</para>
612
626
</listitem>
613
627
</varlistentry>
@@ -682,12 +696,12 @@ su - postgres
682
696
<listitem>
683
697
<para>
684
698
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
687
701
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
689
703
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.
691
705
</para>
692
706
</listitem>
693
707
</varlistentry>
@@ -744,6 +758,21 @@ su - postgres
744
758
</listitem>
745
759
</varlistentry>
746
760
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
+
747
776
<varlistentry>
748
777
<term><option>--with-krb4<optional>=<replaceable>DIRECTORY</></></option></term>
749
778
<term><option>--with-krb5<optional>=<replaceable>DIRECTORY</></></option></term>
@@ -754,7 +783,7 @@ su - postgres
754
783
<replaceable>DIRECTORY</> argument specifies the root
755
784
directory of the Kerberos installation;
756
785
<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
758
787
parent directory, then you must use the
759
788
<option>--with-includes</> and <option>--with-libraries</>
760
789
options in addition to this option. If, on the other hand,
@@ -807,16 +836,11 @@ su - postgres
807
836
</varlistentry>
808
837
809
838
<varlistentry>
810
- <term><option>--with-java </option></term>
839
+ <term><option>--with-pam </option></term>
811
840
<listitem>
812
841
<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.
820
844
</para>
821
845
</listitem>
822
846
</varlistentry>
@@ -828,7 +852,7 @@ su - postgres
828
852
Enables the <productname>PostgreSQL</> server to use the
829
853
<systemitem>syslog</> logging facility. (Using this option does not mean
830
854
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
832
856
on at run time.)
833
857
</para>
834
858
</listitem>
@@ -846,7 +870,7 @@ su - postgres
846
870
having the symbols available is extremely helpful for dealing
847
871
with any problems that may arise. Currently, this option is
848
872
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
850
874
or running a beta version.
851
875
</para>
852
876
</listitem>
@@ -869,18 +893,33 @@ su - postgres
869
893
</para>
870
894
</listitem>
871
895
</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
+
872
911
</variablelist>
873
912
</para>
874
913
875
914
<para>
876
915
If you prefer a C or C++ compiler different from the one
877
916
<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>,
879
918
respectively, to the program of your choice. Similarly, you can
880
919
override the default compiler flags with the <envar>CFLAGS</envar>
881
920
and <envar>CXXFLAGS</envar> variables. For example:
882
921
<screen>
883
- <userinput>env CC=/opt/bin/gcc CFLAGS='-02 -pipe' ./configure</>
922
+ <userinput>env CC=/opt/bin/gcc CFLAGS='-O2 -pipe' ./configure</>
884
923
</screen>
885
924
</para>
886
925
</step>
@@ -894,8 +933,8 @@ su - postgres
894
933
<userinput>gmake</userinput>
895
934
</screen>
896
935
(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
899
938
<screen>
900
939
All of PostgreSQL is successfully made. Ready to install.
901
940
</screen>
@@ -936,7 +975,7 @@ All of PostgreSQL is successfully made. Ready to install.
936
975
<note>
937
976
<para>
938
977
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
940
979
your data and shut down the old server by now, as explained in
941
980
<xref linkend="install-upgrading"> above.
942
981
</para>
@@ -971,7 +1010,7 @@ All of PostgreSQL is successfully made. Ready to install.
971
1010
</para>
972
1011
973
1012
<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
975
1014
application development. If you plan to do any server-side program
976
1015
development (such as custom functions or data types written in C),
977
1016
then you may want to install the entire <productname>PostgreSQL</>
@@ -1001,22 +1040,31 @@ All of PostgreSQL is successfully made. Ready to install.
1001
1040
1002
1041
<para>
1003
1042
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.
1005
1044
</para>
1006
1045
</step>
1007
1046
</procedure>
1008
1047
1009
1048
<para>
1010
1049
After the installation you can make room by removing the built
1011
1050
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
1013
1052
program, so that you can rebuild everything with <command>gmake</>
1014
1053
later on. To reset the source tree to the state in which it was
1015
1054
distributed, use <command>gmake distclean</>. If you are going to
1016
1055
build for several platforms from the same source tree you must do
1017
1056
this and re-configure for each build.
1018
1057
</para>
1019
1058
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
+
1020
1068
</sect1>
1021
1069
1022
1070
<sect1 id="install-post">
@@ -1127,7 +1175,7 @@ libpq.so.2.1: cannot open shared object file: No such file or directory
1127
1175
<para>
1128
1176
If you installed into <filename>/usr/local/pgsql</> or some other
1129
1177
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
1131
1179
<option><literal>--bindir</></> to in <xref linkend="configure">)
1132
1180
into your <envar>PATH</>. To do this, add the following to your
1133
1181
shell start-up file, such as <filename>~/.bash_profile</> (or
@@ -1159,8 +1207,8 @@ MANPATH=/usr/local/pgsql/man:$MANPATH
1159
1207
specify to client applications the host and port of the database
1160
1208
server, overriding the compiled-in defaults. If you are going to
1161
1209
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
1164
1212
line options to most client programs.
1165
1213
</para>
1166
1214
</sect2>
0 commit comments