pg 8 install requirements

14.2. Требования

Вообще, современная совместимая c Unix платформа должна позволять запускать PostgreSQL. Платформы, протестированные на работу с PostgreSQL, внесены в следующий список: Часть 14.7. В поддеректории doc дистрибутива есть FAQ (список часто задаваемых вопросов) для определенных платформ, обращайтесь к нему в случае возникновения проблем.

Для компиляции PostgreSQL требуются следующие пакеты:

  • Необходим GNU make; другие make программы монут не работать. GNU make чаще всего устанавливается под названием gmake; данная документация всегда ссылается на него под этим названием. (На некоторых системах GNU make - утилита по умолчанию и имеет название make.) Для тестирования GNU make введите

    gmake --version
    

    Рекомендуем использовать версию 3.76.1 или более позднюю.

  • Также, вам понадобится ISO/ANSI C компилятор. Рекомендуем свежие версии GCC, но PostgreSQL, как известно, может компилироваться разными компиляторами разных производителей.

  • gzip - необходим для распаковки дистрибутива на диск.

  • Библиотека GNU Readline (для удобного редактирования командной строки и просмотра истории) будет использоваться по умолчанию. Если вы не хотите ее использовать, необходимо определить параметр --without-readline в configure. (В NetBSD, библиотека libedit совместима с библиотекой Readline и используется если libreadline отсутствует.) Если вы используете дистрибутив Linux, основанный на пакетах, то вам нужны будут пакеты readline и readline-devel, если они являются отдельными в вашей системе.

  • Дополнительные программы, необходимые для сборки PostgreSQL в Windows. Вы можете собрать PostgreSQL для систем на основе Windows NT (например, Windows XP и 2003) используя MinGW; смотрите doc/FAQ_MINGW для деталей. Также вы можете собрать PostgreSQL используя Cygwin; смотри doc/FAQ_CYGWIN. Сборка на основе Cygwin будет работать и на старых версиях Windows, но, если у вас есть выбор, рекомендуем использовать MinGW. Эти наборы программ рекомендованы для сборки всего дистрибутива, но вы можете собрать только клиентскую библиотеку на C (libpq) и терминал командной строки (psql) с использованием старых инструментариев Windows. Для подробностей смотри Глава 15.

Следующие пакеты являются необязательными. Они не требуют настроек предварительной настройки, но настройка будет нужна, если вы захотите собрать дистрибутив с включенными функциями, как описано ниже.

  • Для сборки серверного языка программирования PL/Perl вам необходима полная инсталляция языка Perl, включая библиотеку libperl и файлы заголовков. После этого PL/Perl будет библиотекой общего доступа, библиотека libperl должна быть библиотекой общего доступа на многих платформах. Этого делается по умолчанию в текущих версиях Perl, но этого небыло в его старых версиях. В любом случае, это выбор того, кто устанавливал Perl на вашем сайте.

    Если библиотеки общего доступа нет, то вы получите сообщение, подобное этому в процессе сборки, указывающее на этот факт:

    *** Cannot build PL/Perl because libperl is not a shared library.
    *** You might have to rebuild your Perl installation. Refer to
    *** the documentation for details.
    
    *** Не могу собрать PL/Perl, потому что libperl не является библиотекой общего доступа. *** Вы должы пересобрать свой дистрибутив Perl. Смотрите *** документацию для деталей.

    (If you don't follow the on-screen output you will merely notice that the PL/Perl library object, plperl.so or similar, will not be installed.) If you see this, you will have to rebuild and install Perl manually to be able to build PL/Perl. During the configuration process for Perl, request a shared library.

  • To build the PL/Python server programming language, you need a Python installation with the header files and the distutils module. The distutils module is included by default with Python 1.6 and later; users of earlier versions of Python will need to install it.

    Since PL/Python will be a shared library, the libpython library must be a shared library also on most platforms. This is not the case in a default Python installation. If after building and installing you have a file called plpython.so (possibly a different extension), then everything went well. Otherwise you should have seen a notice like this flying by:

    *** Cannot build PL/Python because libpython is not a shared library.
    *** You might have to rebuild your Python installation. Refer to
    *** the documentation for details.
    

    That means you have to rebuild (part of) your Python installation to supply this shared library.

    If you have problems, run Python 2.3 or later's configure using the --enable-shared flag. On some operating systems you don't have to build a shared library, but you will have to convince the PostgreSQL build system of this. Consult the Makefile in the src/pl/plpython directory for details.

  • If you want to build the PL/Tcl procedural language, you of course need a Tcl installation.

  • To enable Native Language Support (NLS), that is, the ability to display a program's messages in a language other than English, you need an implementation of the Gettext API. Some operating systems have this built-in (e.g., Linux, NetBSD, Solaris), for other systems you can download an add-on package from here: http://developer.postgresql.org/~petere/bsd-gettext/. If you are using the Gettext implementation in the GNU C library then you will additionally need the GNU Gettext package for some utility programs. For any of the other implementations you will not need it.

  • Kerberos, OpenSSL, and/or PAM, if you want to support authentication or encryption using these services.

If you are building from a CVS tree instead of using a released source package, or if you want to do development, you also need the following packages:

  • GNU Flex and Bison are needed to build a CVS checkout or if you changed the actual scanner and parser definition files. If you need them, be sure to get Flex 2.5.4 or later and Bison 1.875 or later. Other yacc programs can sometimes be used, but doing so requires extra effort and is not recommended. Other lex programs will definitely not work.

If you need to get a GNU package, you can find it at your local GNU mirror site (see http://www.gnu.org/order/ftp.html for a list) or at ftp://ftp.gnu.org/gnu/.

Also check that you have sufficient disk space. You will need about 65 MB for the source tree during compilation and about 15 MB for the installation directory. An empty database cluster takes about 25 MB, databases take about five times the amount of space that a flat text file with the same data would take. If you are going to run the regression tests you will temporarily need up to an extra 90 MB. Use the df command to check free disk space.