百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 编程字典 > 正文

PostgreSQL源码安装时的./configure相关选项

toyiye 2024-06-22 20:29 9 浏览 0 评论

作者:李明


从PostgreSQL源码运行./configure时,相关可用选项有:

[root@pg postgresql-13.4]# ./configure --help

`configure' configures PostgreSQL 13.4 to adapt to many kinds of systems.


Usage: ./configure [OPTION]... [VAR=VALUE]...


To assign environment variables (e.g., CC, CFLAGS...), specify them as

VAR=VALUE. See below for descriptions of some of the useful variables.


Defaults for the options are specified in brackets.


Configuration:

-h, --help display this help and exit

--help=short display options specific to this package

--help=recursive display the short help of all the included packages

-V, --version display version information and exit

-q, --quiet, --silent do not print `checking ...' messages

--cache-file=FILE cache test results in FILE [disabled]

-C, --config-cache alias for `--cache-file=config.cache'

-n, --no-create do not create output files

--srcdir=DIR find the sources in DIR [configure dir or `..']


Installation directories:

--prefix=PREFIX install architecture-independent files in PREFIX

[/usr/local/pgsql]

--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX

[PREFIX]


By default, `make install' will install all the files in

`/usr/local/pgsql/bin', `/usr/local/pgsql/lib' etc. You can specify

an installation prefix other than `/usr/local/pgsql' using `--prefix',

for instance `--prefix=$HOME'.


For better control, use the options below.


Fine tuning of the installation directories:

--bindir=DIR user executables [EPREFIX/bin]

--sbindir=DIR system admin executables [EPREFIX/sbin]

--libexecdir=DIR program executables [EPREFIX/libexec]

--sysconfdir=DIR read-only single-machine data [PREFIX/etc]

--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]

--localstatedir=DIR modifiable single-machine data [PREFIX/var]

--libdir=DIR object code libraries [EPREFIX/lib]

--includedir=DIR C header files [PREFIX/include]

--oldincludedir=DIR C header files for non-gcc [/usr/include]

--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]

--datadir=DIR read-only architecture-independent data [DATAROOTDIR]

--infodir=DIR info documentation [DATAROOTDIR/info]

--localedir=DIR locale-dependent data [DATAROOTDIR/locale]

--mandir=DIR man documentation [DATAROOTDIR/man]

--docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]

--htmldir=DIR html documentation [DOCDIR]

--dvidir=DIR dvi documentation [DOCDIR]

--pdfdir=DIR pdf documentation [DOCDIR]

--psdir=DIR ps documentation [DOCDIR]


System types:

--build=BUILD configure for building on BUILD [guessed]

--host=HOST cross-compile to build programs to run on HOST [BUILD]


Optional Features:

--disable-option-checking ignore unrecognized --enable/--with options

--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)

--enable-FEATURE[=ARG] include FEATURE [ARG=yes]

--disable-integer-datetimes

obsolete option, no longer supported

--enable-nls[=LANGUAGES]

enable Native Language Support

--disable-rpath do not embed shared library search path in

executables

--disable-spinlocks do not use spinlocks

--disable-atomics do not use atomic operations

--enable-debug build with debugging symbols (-g)

--enable-profiling build with profiling enabled

--enable-coverage build with coverage testing instrumentation

--enable-dtrace build with DTrace support

--enable-tap-tests enable TAP tests (requires Perl and IPC::Run)

--enable-depend turn on automatic dependency tracking

--enable-cassert enable assertion checks (for debugging)

--disable-thread-safety disable thread-safety in client libraries

--disable-largefile omit support for large files


Optional Packages:

--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]

--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)

--with-extra-version=STRING

append STRING to version

--with-template=NAME override operating system template

--with-includes=DIRS look for additional header files in DIRS

--with-libraries=DIRS look for additional libraries in DIRS

--with-libs=DIRS alternative spelling of --with-libraries

--with-pgport=PORTNUM set default port number [5432]

--with-blocksize=BLOCKSIZE

set table block size in kB [8]

--with-segsize=SEGSIZE set table segment size in GB [1]

--with-wal-blocksize=BLOCKSIZE

set WAL block size in kB [8]

--with-CC=CMD set compiler (deprecated)

--with-llvm build with LLVM based JIT support

--with-icu build with ICU support

--with-tcl build Tcl modules (PL/Tcl)

--with-tclconfig=DIR tclConfig.sh is in DIR

--with-perl build Perl modules (PL/Perl)

--with-python build Python modules (PL/Python)

--with-gssapi build with GSSAPI support

--with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)

[postgres]

--with-pam build with PAM support

--with-bsd-auth build with BSD Authentication support

--with-ldap build with LDAP support

--with-bonjour build with Bonjour support

--with-openssl build with OpenSSL support

--with-selinux build with SELinux support

--with-systemd build with systemd support

--without-readline do not use GNU Readline nor BSD Libedit for editing

--with-libedit-preferred

prefer BSD Libedit over GNU Readline

--with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)

--with-ossp-uuid obsolete spelling of --with-uuid=ossp

--with-libxml build with XML support

--with-libxslt use XSLT support when building contrib/xml2

--with-system-tzdata=DIR

use system time zone data in DIR

--without-zlib do not use Zlib

--with-gnu-ld assume the C compiler uses GNU ld [default=no]


Some influential environment variables:

CC C compiler command

CFLAGS C compiler flags

LDFLAGS linker flags, e.g. -L if you have libraries in a

nonstandard directory

LIBS libraries to pass to the linker, e.g. -l

CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if

you have headers in a nonstandard directory

CXX C++ compiler command

CXXFLAGS C++ compiler flags

LLVM_CONFIG path to llvm-config command

CLANG path to clang compiler to generate bitcode

CPP C preprocessor

PKG_CONFIG path to pkg-config utility

PKG_CONFIG_PATH

directories to add to pkg-config's search path

PKG_CONFIG_LIBDIR

path overriding pkg-config's built-in search path

ICU_CFLAGS C compiler flags for ICU, overriding pkg-config

ICU_LIBS linker flags for ICU, overriding pkg-config

XML2_CONFIG path to xml2-config utility

XML2_CFLAGS C compiler flags for XML2, overriding pkg-config

XML2_LIBS linker flags for XML2, overriding pkg-config

LDFLAGS_EX extra linker flags for linking executables only

LDFLAGS_SL extra linker flags for linking shared libraries only

PERL Perl program

PYTHON Python program

MSGFMT msgfmt program for NLS

TCLSH Tcl interpreter program (tclsh)


Use these variables to override the choices made by `configure' or to help

it to find libraries and programs with nonstandard names/locations.


Report bugs to .

PostgreSQL home page: .


部分选项解释如下:


安装路径相关选项


该选项控制make install命令安装文件路径。大部分情况下,均可使用--prefix选项。


--prefix=PREFIX

将所有文件放置到PREFIX指定的路径下(而非默认的/usr/local/pgsql)。


--exec-prefix=EXEC-PREFIX

将体系结构相关的文件放置到与PREFIX不同的路径下。


--bindir=DIRECTORY

可执行文件路径。默认为EXEC-PREFIX/bin,即默认为/usr/local/pgsql/bin。


--sysconfdir=DIRECTORY

配置文件路径。默认为PREFIX/etc。


--libdir=DIRECTORY

设置库及动态加载模块安装路径。默认为EXECPREFIX/lib


--includedir=DIRECTORY

C和C++头文件所在路径,默认为PREFIX/include。


--datarootdir=DIRECTORY

只读数据文件的根目录。默认为PREFIX/share


--localedir=DIRECTORY

本地数据,特别是信息翻译库文件的存放路径。默认为DATAROOTDIR/locale


--mandir=DIRECTORY

PostgreSQL的主页面所在路径。默认为DATAROOTDIR/man


--docdir=DIRECTORY

文档文件的路径。默认为DATAROOTDIR/doc/postgresql。


--htmldir=DIRECTORY

PostgreSQL的HTML格式文档的安装路径。默认为DATAROOTDIR。


PostgreSQL特性相关选项


本节介绍创建PostgreSQL非默认特性的选项。之所以这些特性为非默认的,是因为它们依赖于其他的软件。


--enable-nls[=LANGUAGES]

启用本地语言支持(NLS)。若不指定LANGUAGE,则会安装所有可用的语言。

需要Gettext API。


--with-perl

创建PL/Perl服务端语言。


--with-python

创建PL/Python服务端语言。


--with-tcl

创建PL/Tcl服务端语言。


--with-tclconfig=DIRECTORY

tcl配置文件tclConfig.sh所在路径。


--with-icu

支持ICU(International Component for Unicode)库。需要安装ICU4C包,版本至少为4.2。


--with-llvm

构建基于JIT的LLVM支持。需要安装LLVM库,最低版本为3.9。


--with-openssl

支持SSL(加密)连接。需要安装OpenSSL。


--with-gssapi

支持GSSAPI加密。


--with-ldap

支持LDAP认证及连接参数查看。unix下需要安装OpenLDAP包,windows下,需要安装WinLDAP包。


--with-pam

支持PAM(Pluggable Authentication Modules,可拔插认证模块)。


--with-bsd-auth

支持BSD认证。


--with-systemd

支持systemd服务提醒。需要安装libsystemd及其相关文件。


--with-bonjour

支持Bonjour自动服务发现。


--with-uuid=LIBRARY

创建使用指定UUID库的uuid-ossp模块(提供生成UUID的功能)。LIBRARY需为以下之一:


  • bsd
  • e2fs
  • ossp


--with-ossp-uuid

等同--with-uuid=ossp。


--with-libxml

支持SQL/XML。需要安装Libxml2 2.6.23及更新版本。


--with-libxslt

使用libxslt构建,启用xml2模块从而可以从xml到xsl的转换。必须同时指定--withlibxml


关闭PostgreSQL特性的选项


本节介绍关闭某些默认创建的PostgreSQL特性。如非必要,无需执行。


--without-readline

禁用readline。使得无法在命令行psql编辑和使用历史命令。


--with-libedit-preferred

使用BSD-licensed libedit库而非GPL-licensed ReadLine。默认使用ReadLine。


--without-zlib

不使用zlib库。


--disable-spinlocks

即使PostgreSQL不支持平台的CPU自旋锁,也可以构建成功。使用此选项,会导致很严重的数据库性能问题。


--disable-atomics

禁用CPU原子操作。可能导致数据库性能问题。


--disable-thread-safety

禁用客户端库的线程安全。 这样可以防止libpq和ECPG程序中的并发线程安全地控制其专用连接句柄。 仅在线程支持不足的平台上使用此功能。


构建过程详情选项


--with-includes=DIRECTORIES

DIRECTORIES为冒号分隔的列表,编译器从该路径中检索头文件。如果包装在了非默认路径,则需要指定该参数。

示例:--with-includes=/opt/gnu/include:/usr/sup/include


--with-libraries=DIRECTORIES

DIRECTORIES为冒号分隔的列表,内为库文件。

示例:--with-libraries=/opt/gnu/lib:/usr/sup/lib


--with-system-tzdata=DIRECTORY

使用外部的时区数据库。


--with-extra-version=STRING

添加STRING到PostgreSQL版本号上。


--disable-rpath

不要标记PostgreSQL的可执行文件以指示它们应该在安装的库目录中搜索共享库(请参见--libdir)。


其他选项


在构建时修改默认端口号--with-pgport。以下参数,限资深用户使用。


--with-pgport=NUMBER

为客户端及服务端设置默认端口号。默认为5432。


--with-krb-srvnam=NAME

GSSAPI使用的Kerberos默认名称。默认为postgres。在windows下,必须设置为POSTGRES。


--with-segsize=SEGSIZE

以GB为单位设置segment size。大表被分为segment size大小的多个文件。默认为1GB。不同segment size,不可使用pg_upgrade升级。


--with-blocksize=BLOCKSIZE

以KB为单位设置block size。此为表中存储及I/O的单位。默认为8kb。值必须为2的1到32次方(kb)。不同block size,不可使用pg_upgrade升级。


--with-wal-blocksize=BLOCKSIZE

以kb为单位,设置WAL block size。此为WAL日志中存储及I/O的单位。默认为8kb。值必须为2的1到64次方(kb)。不同wal block size,不可使用pg_upgrade升级。


开发者选项


本节介绍开发及调试PostgreSQL所使用的选项。除了--enable-debug外,其他选项不建议在生产环境使用。对于支持DTrace的操作系统,生产环境也可以启用--enable-dtrace选项。


若构建代码开发服务端,则建议至少启用选项--enable-debug和--enable-cassert。


--enable-debug

以调试模式编译程序及库。即可以在调试模式下运行程序以对问题进行分析。如果使用了GCC编译器,建议启用该选项。


--enable-cassert

在服务端启用断言检查。不建议在生产环境使用该选项。


--enable-tap-tests

启用使用Perl TAP工具进行测试。需要安装Perl及其模块IPC::Run。


--enable-depend

启用自动依赖跟踪。仅支持GCC。


--enable-coverage

如果使用GCC,则所有程序和库都将使用代码覆盖率测试工具进行编译。仅支持GCC。


--enable-profiling

如果使用GCC,则会编译所有程序和库,以便对其进行概要分析。仅支持GCC。


--enable-dtrace

支持动态跟踪工具DTrace。

相关推荐

为何越来越多的编程语言使用JSON(为什么编程)

JSON是JavascriptObjectNotation的缩写,意思是Javascript对象表示法,是一种易于人类阅读和对编程友好的文本数据传递方法,是JavaScript语言规范定义的一个子...

何时在数据库中使用 JSON(数据库用json格式存储)

在本文中,您将了解何时应考虑将JSON数据类型添加到表中以及何时应避免使用它们。每天?分享?最新?软件?开发?,Devops,敏捷?,测试?以及?项目?管理?最新?,最热门?的?文章?,每天?花?...

MySQL 从零开始:05 数据类型(mysql数据类型有哪些,并举例)

前面的讲解中已经接触到了表的创建,表的创建是对字段的声明,比如:上述语句声明了字段的名称、类型、所占空间、默认值和是否可以为空等信息。其中的int、varchar、char和decimal都...

JSON对象花样进阶(json格式对象)

一、引言在现代Web开发中,JSON(JavaScriptObjectNotation)已经成为数据交换的标准格式。无论是从前端向后端发送数据,还是从后端接收数据,JSON都是不可或缺的一部分。...

深入理解 JSON 和 Form-data(json和formdata提交区别)

在讨论现代网络开发与API设计的语境下,理解客户端和服务器间如何有效且可靠地交换数据变得尤为关键。这里,特别值得关注的是两种主流数据格式:...

JSON 语法(json 语法 priority)

JSON语法是JavaScript语法的子集。JSON语法规则JSON语法是JavaScript对象表示法语法的子集。数据在名称/值对中数据由逗号分隔花括号保存对象方括号保存数组JS...

JSON语法详解(json的语法规则)

JSON语法规则JSON语法是JavaScript对象表示法语法的子集。数据在名称/值对中数据由逗号分隔大括号保存对象中括号保存数组注意:json的key是字符串,且必须是双引号,不能是单引号...

MySQL JSON数据类型操作(mysql的json)

概述mysql自5.7.8版本开始,就支持了json结构的数据存储和查询,这表明了mysql也在不断的学习和增加nosql数据库的有点。但mysql毕竟是关系型数据库,在处理json这种非结构化的数据...

JSON的数据模式(json数据格式示例)

像XML模式一样,JSON数据格式也有Schema,这是一个基于JSON格式的规范。JSON模式也以JSON格式编写。它用于验证JSON数据。JSON模式示例以下代码显示了基本的JSON模式。{"...

前端学习——JSON格式详解(后端json格式)

JSON(JavaScriptObjectNotation)是一种轻量级的数据交换格式。易于人阅读和编写。同时也易于机器解析和生成。它基于JavaScriptProgrammingLa...

什么是 JSON:详解 JSON 及其优势(什么叫json)

现在程序员还有谁不知道JSON吗?无论对于前端还是后端,JSON都是一种常见的数据格式。那么JSON到底是什么呢?JSON的定义...

PostgreSQL JSON 类型:处理结构化数据

PostgreSQL提供JSON类型,以存储结构化数据。JSON是一种开放的数据格式,可用于存储各种类型的值。什么是JSON类型?JSON类型表示JSON(JavaScriptO...

JavaScript:JSON、三种包装类(javascript 包)

JOSN:我们希望可以将一个对象在不同的语言中进行传递,以达到通信的目的,最佳方式就是将一个对象转换为字符串的形式JSON(JavaScriptObjectNotation)-JS的对象表示法...

Python数据分析 只要1分钟 教你玩转JSON 全程干货

Json简介:Json,全名JavaScriptObjectNotation,JSON(JavaScriptObjectNotation(记号、标记))是一种轻量级的数据交换格式。它基于J...

比较一下JSON与XML两种数据格式?(json和xml哪个好)

JSON(JavaScriptObjectNotation)和XML(eXtensibleMarkupLanguage)是在日常开发中比较常用的两种数据格式,它们主要的作用就是用来进行数据的传...

取消回复欢迎 发表评论:

请填写验证码