]> begriffs open source - ai-pg/blob - full-docs/html/install-post.html
Include latest toc output
[ai-pg] / full-docs / html / install-post.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>17.5. Post-Installation Setup</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="install-meson.html" title="17.4. Building and Installation with Meson" /><link rel="next" href="supported-platforms.html" title="17.6. Supported Platforms" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">17.5. Post-Installation Setup</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="install-meson.html" title="17.4. Building and Installation with Meson">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="installation.html" title="Chapter 17. Installation from Source Code">Up</a></td><th width="60%" align="center">Chapter 17. Installation from Source Code</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="supported-platforms.html" title="17.6. Supported Platforms">Next</a></td></tr></table><hr /></div><div class="sect1" id="INSTALL-POST"><div class="titlepage"><div><div><h2 class="title" style="clear: both">17.5. Post-Installation Setup <a href="#INSTALL-POST" class="id_link">#</a></h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="install-post.html#INSTALL-POST-SHLIBS">17.5.1. Shared Libraries</a></span></dt><dt><span class="sect2"><a href="install-post.html#INSTALL-POST-ENV-VARS">17.5.2. Environment Variables</a></span></dt></dl></div><div class="sect2" id="INSTALL-POST-SHLIBS"><div class="titlepage"><div><div><h3 class="title">17.5.1. Shared Libraries <a href="#INSTALL-POST-SHLIBS" class="id_link">#</a></h3></div></div></div><a id="id-1.6.4.8.2.2" class="indexterm"></a><p>
3     On some systems with shared libraries
4     you need to tell the system how to find the newly installed
5     shared libraries.  The systems on which this is
6     <span class="emphasis"><em>not</em></span> necessary include
7     <span class="systemitem">FreeBSD</span>,
8     <span class="systemitem">Linux</span>,
9     <span class="systemitem">NetBSD</span>, <span class="systemitem">OpenBSD</span>, and
10     <span class="systemitem">Solaris</span>.
11    </p><p>
12     The method to set the shared library search path varies between
13     platforms, but the most widely-used method is to set the
14     environment variable <code class="envar">LD_LIBRARY_PATH</code> like so: In Bourne
15     shells (<code class="command">sh</code>, <code class="command">ksh</code>, <code class="command">bash</code>, <code class="command">zsh</code>):
16 </p><pre class="programlisting">
17 LD_LIBRARY_PATH=/usr/local/pgsql/lib
18 export LD_LIBRARY_PATH
19 </pre><p>
20     or in <code class="command">csh</code> or <code class="command">tcsh</code>:
21 </p><pre class="programlisting">
22 setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
23 </pre><p>
24     Replace <code class="literal">/usr/local/pgsql/lib</code> with whatever you set
25     <code class="option"><code class="literal">--libdir</code></code> to in <a class="xref" href="install-make.html#CONFIGURE" title="Configuration">Step 1</a>.
26     You should put these commands into a shell start-up file such as
27     <code class="filename">/etc/profile</code> or <code class="filename">~/.bash_profile</code>.  Some
28     good information about the caveats associated with this method can
29     be found at <a class="ulink" href="http://xahlee.info/UnixResource_dir/_/ldpath.html" target="_top">http://xahlee.info/UnixResource_dir/_/ldpath.html</a>.
30    </p><p>
31     On some systems it might be preferable to set the environment
32     variable <code class="envar">LD_RUN_PATH</code> <span class="emphasis"><em>before</em></span>
33     building.
34    </p><p>
35     On <span class="systemitem">Cygwin</span>, put the library
36     directory in the <code class="envar">PATH</code> or move the
37     <code class="filename">.dll</code> files into the <code class="filename">bin</code>
38     directory.
39    </p><p>
40     If in doubt, refer to the manual pages of your system (perhaps
41     <code class="command">ld.so</code> or <code class="command">rld</code>). If you later
42     get a message like:
43 </p><pre class="screen">
44 psql: error in loading shared libraries
45 libpq.so.2.1: cannot open shared object file: No such file or directory
46 </pre><p>
47     then this step was necessary.  Simply take care of it then.
48    </p><p>
49     <a id="id-1.6.4.8.2.8.1" class="indexterm"></a>
50     If you are on <span class="systemitem">Linux</span> and you have root
51     access, you can run:
52 </p><pre class="programlisting">
53 /sbin/ldconfig /usr/local/pgsql/lib
54 </pre><p>
55     (or equivalent directory) after installation to enable the
56     run-time linker to find the shared libraries faster.  Refer to the
57     manual page of <code class="command">ldconfig</code> for more information.  On
58     <span class="systemitem">FreeBSD</span>, <span class="systemitem">NetBSD</span>, and <span class="systemitem">OpenBSD</span> the command is:
59 </p><pre class="programlisting">
60 /sbin/ldconfig -m /usr/local/pgsql/lib
61 </pre><p>
62     instead.  Other systems are not known to have an equivalent
63     command.
64    </p></div><div class="sect2" id="INSTALL-POST-ENV-VARS"><div class="titlepage"><div><div><h3 class="title">17.5.2. Environment Variables <a href="#INSTALL-POST-ENV-VARS" class="id_link">#</a></h3></div></div></div><a id="id-1.6.4.8.3.2" class="indexterm"></a><p>
65     If you installed into <code class="filename">/usr/local/pgsql</code> or some other
66     location that is not searched for programs by default, you should
67     add <code class="filename">/usr/local/pgsql/bin</code> (or whatever you set
68     <code class="option"><code class="literal">--bindir</code></code> to in <a class="xref" href="install-make.html#CONFIGURE" title="Configuration">Step 1</a>)
69     into your <code class="envar">PATH</code>.  Strictly speaking, this is not
70     necessary, but it will make the use of <span class="productname">PostgreSQL</span>
71     much more convenient.
72    </p><p>
73     To do this, add the following to your shell start-up file, such as
74     <code class="filename">~/.bash_profile</code> (or <code class="filename">/etc/profile</code>, if you
75     want it to affect all users):
76 </p><pre class="programlisting">
77 PATH=/usr/local/pgsql/bin:$PATH
78 export PATH
79 </pre><p>
80     If you are using <code class="command">csh</code> or <code class="command">tcsh</code>, then use this command:
81 </p><pre class="programlisting">
82 set path = ( /usr/local/pgsql/bin $path )
83 </pre><p>
84    </p><p>
85     <a id="id-1.6.4.8.3.5.1" class="indexterm"></a>
86     To enable your system to find the <span class="application">man</span>
87     documentation, you need to add lines like the following to a
88     shell start-up file unless you installed into a location that is
89     searched by default:
90 </p><pre class="programlisting">
91 MANPATH=/usr/local/pgsql/share/man:$MANPATH
92 export MANPATH
93 </pre><p>
94    </p><p>
95     The environment variables <code class="envar">PGHOST</code> and <code class="envar">PGPORT</code>
96     specify to client applications the host and port of the database
97     server, overriding the compiled-in defaults. If you are going to
98     run client applications remotely then it is convenient if every
99     user that plans to use the database sets <code class="envar">PGHOST</code>.  This
100     is not required, however; the settings can be communicated via command
101     line options to most client programs.
102    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="install-meson.html" title="17.4. Building and Installation with Meson">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="installation.html" title="Chapter 17. Installation from Source Code">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="supported-platforms.html" title="17.6. Supported Platforms">Next</a></td></tr><tr><td width="40%" align="left" valign="top">17.4. Building and Installation with Meson </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 17.6. Supported Platforms</td></tr></table></div></body></html>