Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bee6cc6

Browse files
committed
Update for recent developments (C++, shlib), minor fixes
1 parent dd03129 commit bee6cc6

File tree

1 file changed

+51
-34
lines changed

1 file changed

+51
-34
lines changed

doc/src/sgml/installation.sgml

+51-34
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 $ -->
22

33
<chapter id="installation">
44
<title><![%flattext-install-include[<productname>PostgreSQL</> ]]>Installation Instructions</title>
@@ -7,7 +7,7 @@
77
<title>Short Version</title>
88

99
<para>
10-
<programlisting>
10+
<synopsis>
1111
./configure
1212
gmake
1313
gmake install
@@ -17,7 +17,7 @@ su - postgres
1717
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data &gt;logfile 2&gt;&amp;1 &amp;
1818
/usr/local/pgsql/bin/createdb test
1919
/usr/local/pgsql/bin/psql test
20-
</programlisting>
20+
</synopsis>
2121
The long version is the rest of this
2222
<![%flattext-install-include;[document.]]>
2323
<![%flattext-install-ignore;[chapter.]]>
@@ -149,8 +149,8 @@ su - postgres
149149

150150
<para>
151151
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
154154
<quote>&majorversion;.x</quote>, you must back up and restore your
155155
data as shown here. These instructions assume that your existing
156156
installation is under the <filename>/usr/local/pgsql</> directory,
@@ -207,9 +207,9 @@ su - postgres
207207
On systems which have <productname>PostgreSQL</> started at boot time, there is
208208
probably a start-up file that will accomplish the same thing. For
209209
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>
213213
works.
214214
</para>
215215
</step>
@@ -265,7 +265,7 @@ su - postgres
265265
The first step of the installation procedure is to configure the
266266
source tree for your system and choose the options you would like.
267267
This is done by running the <filename>configure</> script. For a
268-
default installation simply type
268+
default installation simply enter
269269
<screen>
270270
<userinput>./configure</userinput>
271271
</screen>
@@ -283,7 +283,7 @@ su - postgres
283283
</para>
284284

285285
<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
287287
or more of the following command line options to
288288
<filename>configure</filename>:
289289

@@ -507,11 +507,7 @@ su - postgres
507507
<term>--with-CXX</term>
508508
<listitem>
509509
<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.
515511
</para>
516512
</listitem>
517513
</varlistentry>
@@ -693,11 +689,14 @@ su - postgres
693689
</para>
694690

695691
<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:
699698
<screen>
700-
<userinput>CC=/opt/bin/gcc ./configure</>
699+
<userinput>env CC=/opt/bin/gcc CFLAGS='-02 -pipe' ./configure</>
701700
</screen>
702701
</para>
703702

@@ -825,12 +824,19 @@ All of PostgreSQL is successfully made. Ready to install.
825824
<sect2>
826825
<title>Shared Libraries</title>
827826
<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)
829828
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)
834840
<programlisting>
835841
LD_LIBRARY_PATH=/usr/local/pgsql/lib
836842
export LD_LIBRARY_PATH
@@ -842,9 +848,19 @@ setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
842848
Replace <literal>/usr/local/pgsql/lib</> with whatever you set
843849
<option><literal>--libdir</></> to in <xref linkend="configure">.
844850
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.
846861
</para>
847862

863+
<!--
848864
<para>
849865
On Linux systems the following is the preferred method, but you
850866
must have root access. Edit the file <filename>/etc/ld.so.conf</>
@@ -854,17 +870,17 @@ setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
854870
</programlisting>
855871
Then run command <command>/sbin/ldconfig</>.
856872
</para>
857-
873+
-->
858874
<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
860877
on get a message like
861878
<screen>
862879
psql: error in loading shared libraries
863880
libpq.so.2.1: cannot open shared object file: No such file or directory
864881
</screen>
865882
then this step was necessary. Simply take care of it then.
866883
</para>
867-
868884
</sect2>
869885

870886
<sect2>
@@ -921,12 +937,13 @@ MANPATH=$MANPATH:/usr/local/pgsql/man
921937
<procedure>
922938
<step>
923939
<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.
930947
<screen>
931948
<userinput>adduser postgres</>
932949
</screen>

0 commit comments

Comments
 (0)