1
- <!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.27 2000/10/21 15:50:32 momjian Exp $ -->
1
+ <!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.28 2000/11/05 20:52:59 petere Exp $ -->
2
2
3
3
<chapter id="installation">
4
4
<title><![%flattext-install-include[<productname>PostgreSQL</> ]]>Installation Instructions</title>
7
7
<title>Short Version</title>
8
8
9
9
<para>
10
- <programlisting >
10
+ <synopsis >
11
11
./configure
12
12
gmake
13
13
gmake install
@@ -17,7 +17,7 @@ su - postgres
17
17
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
18
18
/usr/local/pgsql/bin/createdb test
19
19
/usr/local/pgsql/bin/psql test
20
- </programlisting >
20
+ </synopsis >
21
21
The long version is the rest of this
22
22
<![%flattext-install-include;[document.]]>
23
23
<![%flattext-install-ignore;[chapter.]]>
@@ -149,8 +149,8 @@ su - postgres
149
149
150
150
<para>
151
151
The internal data storage format changes with new releases of
152
- <productname>PostgreSQL</>. Therefore, if you are upgrading an existing installation
153
- that does not have a version number
152
+ <productname>PostgreSQL</>. Therefore, if you are upgrading an
153
+ existing installation that does not have a version number
154
154
<quote>&majorversion;.x</quote>, you must back up and restore your
155
155
data as shown here. These instructions assume that your existing
156
156
installation is under the <filename>/usr/local/pgsql</> directory,
@@ -207,9 +207,9 @@ su - postgres
207
207
On systems which have <productname>PostgreSQL</> started at boot time, there is
208
208
probably a start-up file that will accomplish the same thing. For
209
209
example, on a Redhat Linux system one might find that
210
- <programlisting >
211
- /etc/rc.d/init.d/postgres.init stop
212
- </programlisting >
210
+ <screen >
211
+ <userinput> /etc/rc.d/init.d/postgres.init stop</userinput>
212
+ </screen >
213
213
works.
214
214
</para>
215
215
</step>
@@ -265,7 +265,7 @@ su - postgres
265
265
The first step of the installation procedure is to configure the
266
266
source tree for your system and choose the options you would like.
267
267
This is done by running the <filename>configure</> script. For a
268
- default installation simply type
268
+ default installation simply enter
269
269
<screen>
270
270
<userinput>./configure</userinput>
271
271
</screen>
@@ -283,7 +283,7 @@ su - postgres
283
283
</para>
284
284
285
285
<para>
286
- You can customize the build and installation process by giving one
286
+ You can customize the build and installation process by supplying one
287
287
or more of the following command line options to
288
288
<filename>configure</filename>:
289
289
@@ -507,11 +507,7 @@ su - postgres
507
507
<term>--with-CXX</term>
508
508
<listitem>
509
509
<para>
510
- Build the C++ interface library. <filename>configure</> will
511
- automatically pick the C++ compiler that goes with the C
512
- compiler you are using. It is not recommended or supported to
513
- use C and C++ compilers of different origin in the same
514
- build.
510
+ Build the C++ interface library.
515
511
</para>
516
512
</listitem>
517
513
</varlistentry>
@@ -693,11 +689,14 @@ su - postgres
693
689
</para>
694
690
695
691
<para>
696
- You can set the <envar>CC</> environment variable to choose the C
697
- compiler to use. If you don't then <filename>configure</> will
698
- look for one. For example:
692
+ If you prefer a C or C++ compiler different from the one
693
+ <filename>configure</filename> picks then you can set the
694
+ environment variables <envar>CC</> and <envar>CXX</envar>,
695
+ respectively, to the program of your choice. Similarly, you can
696
+ override the default compiler flags with the <envar>CFLAGS</envar>
697
+ and <envar>CXXFLAGS</envar> variables. For example:
699
698
<screen>
700
- <userinput>CC=/opt/bin/gcc ./configure</>
699
+ <userinput>env CC=/opt/bin/gcc CFLAGS='-02 -pipe' ./configure</>
701
700
</screen>
702
701
</para>
703
702
@@ -825,12 +824,19 @@ All of PostgreSQL is successfully made. Ready to install.
825
824
<sect2>
826
825
<title>Shared Libraries</title>
827
826
<para>
828
- On most systems that have shared libraries (which most systems do)
827
+ On some systems that have shared libraries (which most systems do)
829
828
you need to tell your system how to find the newly installed
830
- shared libraries. How to do this varies between platforms, but the
831
- most widely usable method is to set the environment variable
832
- <envar>LD_LIBRARY_PATH</> like so: In Bourne shells (sh, ksh,
833
- bash, zsh)
829
+ shared libraries. The systems on which this is
830
+ <emphasis>not</emphasis> necessary include FreeBSD, HP/UX, Irix,
831
+ Linux, NetBSD, OpenBSD, OSF/1 (Digital Unix, Tru64 UNIX), and
832
+ Solaris.
833
+ </para>
834
+
835
+ <para>
836
+ The method to set the shared library search path varies between
837
+ platforms, but the most widely usable method is to set the
838
+ environment variable <envar>LD_LIBRARY_PATH</> like so: In Bourne
839
+ shells (sh, ksh, bash, zsh)
834
840
<programlisting>
835
841
LD_LIBRARY_PATH=/usr/local/pgsql/lib
836
842
export LD_LIBRARY_PATH
@@ -842,9 +848,19 @@ setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
842
848
Replace <literal>/usr/local/pgsql/lib</> with whatever you set
843
849
<option><literal>--libdir</></> to in <xref linkend="configure">.
844
850
You should put these commands into a shell start-up file such as
845
- <filename>/etc/profile</> or <filename>~/.bash_profile</>.
851
+ <filename>/etc/profile</> or <filename>~/.bash_profile</>. Some
852
+ good information about the caveats associated with the method can
853
+ be found at <ulink
854
+ url="http://www.visi.com/~barr/ldpath.html">http://www.visi.com/~barr/ldpath.html</ulink>.
855
+ </para>
856
+
857
+ <para>
858
+ On some systems it might be preferrable to set the environment
859
+ variable <envar>LD_RUN_PATH</envar> <emphasis>before</emphasis>
860
+ building.
846
861
</para>
847
862
863
+ <!--
848
864
<para>
849
865
On Linux systems the following is the preferred method, but you
850
866
must have root access. Edit the file <filename>/etc/ld.so.conf</>
@@ -854,17 +870,17 @@ setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
854
870
</programlisting>
855
871
Then run command <command>/sbin/ldconfig</>.
856
872
</para>
857
-
873
+ -->
858
874
<para>
859
- If in doubt, refer to the manual pages of your system. If you later
875
+ If in doubt, refer to the manual pages of your system (perhaps
876
+ <command>ld.so</command> or <command>rld</command>). If you later
860
877
on get a message like
861
878
<screen>
862
879
psql: error in loading shared libraries
863
880
libpq.so.2.1: cannot open shared object file: No such file or directory
864
881
</screen>
865
882
then this step was necessary. Simply take care of it then.
866
883
</para>
867
-
868
884
</sect2>
869
885
870
886
<sect2>
@@ -921,12 +937,13 @@ MANPATH=$MANPATH:/usr/local/pgsql/man
921
937
<procedure>
922
938
<step>
923
939
<para>
924
- Create the <productname>PostgreSQL</> server account. This is the user the server
925
- will run as. For production use you should create a separate,
926
- unprivileged account (<quote>postgres</> is commonly used). If
927
- you do not have root access or just want to play around, your own
928
- user account is enough, but running the server as root is a
929
- security risk and therefore not allowed.
940
+ Create a user account for the <productname>PostgreSQL</>
941
+ server. This is the user the server will run as. For production
942
+ use you should create a separate, unprivileged account
943
+ (<quote>postgres</> is commonly used). If you do not have root
944
+ access or just want to play around, your own user account is
945
+ enough, but running the server as root is a security risk and
946
+ will not work.
930
947
<screen>
931
948
<userinput>adduser postgres</>
932
949
</screen>
0 commit comments