1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>14.6.Post-Installation Setup</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<link rev="made" href="pgsql-docs@postgresql.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
<link rel="up" href="installation.html" title="Chapter14. Installation Instructions">
<link rel="prev" href="install-procedure.html" title="14.5.Installation Procedure">
<link rel="next" href="supported-platforms.html" title="14.7.Supported Platforms">
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="install-post"></a>14.6.Post-Installation Setup</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id637172"></a>14.6.1.Shared Libraries</h3></div></div></div>
<a name="id637176"></a><p> On some systems that have shared libraries (which most systems do)
you need to tell your 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">BSD/OS</span>, <span class="systemitem">FreeBSD</span>,
<span class="systemitem">HP-UX</span>, <span class="systemitem">IRIX</span>, <span class="systemitem">Linux</span>,
<span class="systemitem">NetBSD</span>, <span class="systemitem">OpenBSD</span>, <span class="systemitem">Tru64
UNIX</span> (formerly <span class="systemitem">Digital UNIX</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 usable 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 href="install-procedure.html#configure" title="Step 1">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 href="http://www.visi.com/~barr/ldpath.html" target="_top">http://www.visi.com/~barr/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
on 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 name="id637457"></a>
If you are on <span class="systemitem">BSD/OS</span>, <span class="systemitem">Linux</span>, or <span class="systemitem">SunOS 4</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" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id637545"></a>14.6.2.Environment Variables</h3></div></div></div>
<a name="id637549"></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 href="install-procedure.html#configure" title="Step 1">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 every user):
</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 name="id637650"></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/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></body>
</html>
|