Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 9b6cc37ce608401d44f6535a0c7cb777 > files > 446

postgresql11-docs-11.5-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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>16.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-procedure.html" title="16.4. Installation Procedure" /><link rel="next" href="supported-platforms.html" title="16.6. Supported Platforms" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">16.5. Post-Installation Setup</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="install-procedure.html" title="16.4. Installation Procedure">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="installation.html" title="Chapter 16. Installation from Source Code">Up</a></td><th width="60%" align="center">Chapter 16. Installation from Source Code</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 11.5 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="supported-platforms.html" title="16.6. Supported Platforms">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="INSTALL-POST"><div class="titlepage"><div><div><h2 class="title" style="clear: both">16.5. Post-Installation Setup</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="install-post.html#id-1.6.3.8.2">16.5.1. Shared Libraries</a></span></dt><dt><span class="sect2"><a href="install-post.html#id-1.6.3.8.3">16.5.2. Environment Variables</a></span></dt></dl></div><div class="sect2" id="id-1.6.3.8.2"><div class="titlepage"><div><div><h3 class="title">16.5.1. Shared Libraries</h3></div></div></div><a id="id-1.6.3.8.2.2" class="indexterm"></a><p>
    On some systems with shared libraries
    you need to tell the system how to find the newly installed
    shared libraries.  The systems on which this is
    <span class="emphasis"><em>not</em></span> necessary include
    <span class="systemitem">FreeBSD</span>,
    <span class="systemitem">HP-UX</span>,
    <span class="systemitem">Linux</span>,
    <span class="systemitem">NetBSD</span>, <span class="systemitem">OpenBSD</span>, and
    <span class="systemitem">Solaris</span>.
   </p><p>
    The method to set the shared library search path varies between
    platforms, but the most widely-used method is to set the
    environment variable <code class="envar">LD_LIBRARY_PATH</code> like so: In Bourne
    shells (<code class="command">sh</code>, <code class="command">ksh</code>, <code class="command">bash</code>, <code class="command">zsh</code>):
</p><pre class="programlisting">
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH
</pre><p>
    or in <code class="command">csh</code> or <code class="command">tcsh</code>:
</p><pre class="programlisting">
setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
</pre><p>
    Replace <code class="literal">/usr/local/pgsql/lib</code> with whatever you set
    <code class="option"><code class="literal">--libdir</code></code> to in <a class="xref" href="install-procedure.html#CONFIGURE" title="Configuration">Step 1</a>.
    You should put these commands into a shell start-up file such as
    <code class="filename">/etc/profile</code> or <code class="filename">~/.bash_profile</code>.  Some
    good information about the caveats associated with this method can
    be found at <a class="ulink" href="http://xahlee.info/UnixResource_dir/_/ldpath.html" target="_top">http://xahlee.info/UnixResource_dir/_/ldpath.html</a>.
   </p><p>
    On some systems it might be preferable to set the environment
    variable <code class="envar">LD_RUN_PATH</code> <span class="emphasis"><em>before</em></span>
    building.
   </p><p>
    On <span class="systemitem">Cygwin</span>, put the library
    directory in the <code class="envar">PATH</code> or move the
    <code class="filename">.dll</code> files into the <code class="filename">bin</code>
    directory.
   </p><p>
    If in doubt, refer to the manual pages of your system (perhaps
    <code class="command">ld.so</code> or <code class="command">rld</code>). If you later
    get a message like:
</p><pre class="screen">
psql: error in loading shared libraries
libpq.so.2.1: cannot open shared object file: No such file or directory
</pre><p>
    then this step was necessary.  Simply take care of it then.
   </p><p>
    <a id="id-1.6.3.8.2.8.1" class="indexterm"></a>
    If you are on <span class="systemitem">Linux</span> and you have root
    access, you can run:
</p><pre class="programlisting">
/sbin/ldconfig /usr/local/pgsql/lib
</pre><p>
    (or equivalent directory) after installation to enable the
    run-time linker to find the shared libraries faster.  Refer to the
    manual page of <code class="command">ldconfig</code> for more information.  On
    <span class="systemitem">FreeBSD</span>, <span class="systemitem">NetBSD</span>, and <span class="systemitem">OpenBSD</span> the command is:
</p><pre class="programlisting">
/sbin/ldconfig -m /usr/local/pgsql/lib
</pre><p>
    instead.  Other systems are not known to have an equivalent
    command.
   </p></div><div class="sect2" id="id-1.6.3.8.3"><div class="titlepage"><div><div><h3 class="title">16.5.2. Environment Variables</h3></div></div></div><a id="id-1.6.3.8.3.2" class="indexterm"></a><p>
    If you installed into <code class="filename">/usr/local/pgsql</code> or some other
    location that is not searched for programs by default, you should
    add <code class="filename">/usr/local/pgsql/bin</code> (or whatever you set
    <code class="option"><code class="literal">--bindir</code></code> to in <a class="xref" href="install-procedure.html#CONFIGURE" title="Configuration">Step 1</a>)
    into your <code class="envar">PATH</code>.  Strictly speaking, this is not
    necessary, but it will make the use of <span class="productname">PostgreSQL</span>
    much more convenient.
   </p><p>
    To do this, add the following to your shell start-up file, such as
    <code class="filename">~/.bash_profile</code> (or <code class="filename">/etc/profile</code>, if you
    want it to affect all users):
</p><pre class="programlisting">
PATH=/usr/local/pgsql/bin:$PATH
export PATH
</pre><p>
    If you are using <code class="command">csh</code> or <code class="command">tcsh</code>, then use this command:
</p><pre class="programlisting">
set path = ( /usr/local/pgsql/bin $path )
</pre><p>
   </p><p>
    <a id="id-1.6.3.8.3.5.1" class="indexterm"></a>
    To enable your system to find the <span class="application">man</span>
    documentation, you need to add lines like the following to a
    shell start-up file unless you installed into a location that is
    searched by default:
</p><pre class="programlisting">
MANPATH=/usr/local/pgsql/share/man:$MANPATH
export MANPATH
</pre><p>
   </p><p>
    The environment variables <code class="envar">PGHOST</code> and <code class="envar">PGPORT</code>
    specify to client applications the host and port of the database
    server, overriding the compiled-in defaults. If you are going to
    run client applications remotely then it is convenient if every
    user that plans to use the database sets <code class="envar">PGHOST</code>.  This
    is not required, however; the settings can be communicated via command
    line options to most client programs.
   </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="install-procedure.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="installation.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="supported-platforms.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">16.4. Installation Procedure </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 16.6. Supported Platforms</td></tr></table></div></body></html>