]> begriffs open source - ai-pg/blob - full-docs/txt/install-post.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / install-post.txt
1
2 17.5. Post-Installation Setup #
3
4    17.5.1. Shared Libraries
5    17.5.2. Environment Variables
6
7 17.5.1. Shared Libraries #
8
9    On some systems with shared libraries you need to tell the system how
10    to find the newly installed shared libraries. The systems on which this
11    is not necessary include FreeBSD, Linux, NetBSD, OpenBSD, and Solaris.
12
13    The method to set the shared library search path varies between
14    platforms, but the most widely-used method is to set the environment
15    variable LD_LIBRARY_PATH like so: In Bourne shells (sh, ksh, bash,
16    zsh):
17 LD_LIBRARY_PATH=/usr/local/pgsql/lib
18 export LD_LIBRARY_PATH
19
20    or in csh or tcsh:
21 setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
22
23    Replace /usr/local/pgsql/lib with whatever you set --libdir to in Step
24    1. You should put these commands into a shell start-up file such as
25    /etc/profile or ~/.bash_profile. Some good information about the
26    caveats associated with this method can be found at
27    http://xahlee.info/UnixResource_dir/_/ldpath.html.
28
29    On some systems it might be preferable to set the environment variable
30    LD_RUN_PATH before building.
31
32    On Cygwin, put the library directory in the PATH or move the .dll files
33    into the bin directory.
34
35    If in doubt, refer to the manual pages of your system (perhaps ld.so or
36    rld). If you later get a message like:
37 psql: error in loading shared libraries
38 libpq.so.2.1: cannot open shared object file: No such file or directory
39
40    then this step was necessary. Simply take care of it then.
41
42    If you are on Linux and you have root access, you can run:
43 /sbin/ldconfig /usr/local/pgsql/lib
44
45    (or equivalent directory) after installation to enable the run-time
46    linker to find the shared libraries faster. Refer to the manual page of
47    ldconfig for more information. On FreeBSD, NetBSD, and OpenBSD the
48    command is:
49 /sbin/ldconfig -m /usr/local/pgsql/lib
50
51    instead. Other systems are not known to have an equivalent command.
52
53 17.5.2. Environment Variables #
54
55    If you installed into /usr/local/pgsql or some other location that is
56    not searched for programs by default, you should add
57    /usr/local/pgsql/bin (or whatever you set --bindir to in Step 1) into
58    your PATH. Strictly speaking, this is not necessary, but it will make
59    the use of PostgreSQL much more convenient.
60
61    To do this, add the following to your shell start-up file, such as
62    ~/.bash_profile (or /etc/profile, if you want it to affect all users):
63 PATH=/usr/local/pgsql/bin:$PATH
64 export PATH
65
66    If you are using csh or tcsh, then use this command:
67 set path = ( /usr/local/pgsql/bin $path )
68
69    To enable your system to find the man documentation, you need to add
70    lines like the following to a shell start-up file unless you installed
71    into a location that is searched by default:
72 MANPATH=/usr/local/pgsql/share/man:$MANPATH
73 export MANPATH
74
75    The environment variables PGHOST and PGPORT specify to client
76    applications the host and port of the database server, overriding the
77    compiled-in defaults. If you are going to run client applications
78    remotely then it is convenient if every user that plans to use the
79    database sets PGHOST. This is not required, however; the settings can
80    be communicated via command line options to most client programs.