Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
17.5. Post-Installation Setup
Prev UpChapter 17. Installation from Source CodeHome Next

17.5. Post-Installation Setup#

17.5.1. Shared Libraries#

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 isnot necessary includeFreeBSD,Linux,NetBSD,OpenBSD, andSolaris.

The method to set the shared library search path varies between platforms, but the most widely-used method is to set the environment variableLD_LIBRARY_PATH like so: In Bourne shells (sh,ksh,bash,zsh):

LD_LIBRARY_PATH=/usr/local/pgsql/libexport LD_LIBRARY_PATH

or incsh ortcsh:

setenv LD_LIBRARY_PATH /usr/local/pgsql/lib

Replace/usr/local/pgsql/lib with whatever you set--libdir to inStep 1. You should put these commands into a shell start-up file such as/etc/profile or~/.bash_profile. Some good information about the caveats associated with this method can be found athttp://xahlee.info/UnixResource_dir/_/ldpath.html.

On some systems it might be preferable to set the environment variableLD_RUN_PATHbefore building.

OnCygwin, put the library directory in thePATH or move the.dll files into thebin directory.

If in doubt, refer to the manual pages of your system (perhapsld.so orrld). If you later get a message like:

psql: error in loading shared librarieslibpq.so.2.1: cannot open shared object file: No such file or directory

then this step was necessary. Simply take care of it then.

If you are onLinux and you have root access, you can run:

/sbin/ldconfig /usr/local/pgsql/lib

(or equivalent directory) after installation to enable the run-time linker to find the shared libraries faster. Refer to the manual page ofldconfig for more information. OnFreeBSD,NetBSD, andOpenBSD the command is:

/sbin/ldconfig -m /usr/local/pgsql/lib

instead. Other systems are not known to have an equivalent command.

17.5.2. Environment Variables#

If you installed into/usr/local/pgsql or some other location that is not searched for programs by default, you should add/usr/local/pgsql/bin (or whatever you set--bindir to inStep 1) into yourPATH. Strictly speaking, this is not necessary, but it will make the use ofPostgreSQL much more convenient.

To do this, add the following to your shell start-up file, such as~/.bash_profile (or/etc/profile, if you want it to affect all users):

PATH=/usr/local/pgsql/bin:$PATHexport PATH

If you are usingcsh ortcsh, then use this command:

set path = ( /usr/local/pgsql/bin $path )

To enable your system to find theman 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:

MANPATH=/usr/local/pgsql/share/man:$MANPATHexport MANPATH

The environment variablesPGHOST andPGPORT 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 setsPGHOST. This is not required, however; the settings can be communicated via command line options to most client programs.


Prev Up Next
17.4. Building and Installation with Meson Home 17.6. Supported Platforms
pdfepub
Go to PostgreSQL 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp