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

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

toyiye 2024-06-21 12:23 16 浏览 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。

相关推荐

Asterisk-ARI对通道中的DTMF事件处理

Asterisk通道中关于DTMF处理是一个非常重要的功能。通过DTMF可以实现很多的业务处理。现在我们介绍一下关于ARI对通道中的DTMF处理,我们通过自动话务员实例来说明Asterisk如何创建一...

PyQt5 初次使用(pyqt5下载官网)

本篇文章默认已安装Python3,本篇文章默认使用虚拟环境。安装pipinstallPyQt5PyQt一些图形界面开发工具QtDesigner、国际化翻译工具Liguist需要另外...

Qt开发,使用Qt for Python还是Qt C++ Qt开发,使用Qt for

Qt开发使用QtforPython还是QtC++?1.早些年写过一个PyQt5的项目,最近几年重构成QtC++了,其中有个人原因,如早期代码写得烂,...

最简单方法!!用python生成动态条形图

最近非常流行动态条形图,在B站等视频网站上,此类视频经常会有上百万的播放量,今天我们通过第三方库:bar_chart_race(0.2版本)来实现动态条形图的生成;生成的效果如图:问题:...

Asterisk通道和ARI接口的通信(aau通道数)

Asterisk通道和ARI详解什么是通道Asterisk中,通道是介于终端和Asterisk自己本身的一个通信媒介。它包含了所有相关信息传递到终端,或者从终端传递到Asterisk服务器端。这些信...

Python GUI-长链转短链(长链接转化成短链接java)

当我们要分享某一个链接给别人,或是要把某个链接放入帖子中时,如果链接太长,则会占用大量空间,而且很不美观。这时候,我们可以结束长链转短链工具进行转换。当然可以直接搜索在线的网站进行转换,但我们可以借此...

Python 的hash 函数(python的hash函数)

今天在看python的hash函数源码的时候,发现针对不同的数据类型python实现了不同的hash函数,今天简单介绍源码中提到的hash函数。(https://github.com/pyth...

8款Python GUI开源框架,谁才是你的菜?

作为Python开发者,你迟早都会用到图形用户界面来开发应用。本文千锋武汉Python培训小编将推荐一些PythonGUI框架,希望对你有所帮助。1、Python的UI开发工具包Kivy...

python适合开发桌面软件吗?(python可不可以开发桌面应用软件)

其实Python/Java/PHP都不适合用来做桌面开发,Java还是有几个比较成熟的产品的,比如大名鼎鼎的Java集成开发环境IntelliJIDEA、Eclipse就是用Java开发的,不过PH...

CryptoChat:一款功能强大的纯Python消息加密安全传输工具

关于CryptoChatCryptoChat是一款功能强大的纯Python消息加密安全传输工具,该工具专为安全研究专家、渗透测试人员和红蓝队专家设计,该工具可以完全保证数据传输中的隐私安全。该工具建立...

为什么都说Python简单,但我觉得难?

Python普遍被大家认为是编程语言中比较简单的一种,但有一位电子信息的学生说自己已经学了C语言,但仍然觉得Python挺难的,感觉有很多疑问,像迭代器、装饰器什么的……所以他提出疑问:Python真...

蓝牙电话-关联FreeSwitch中继SIP账号通过Rest接口

蓝牙电话-关联FreeSwitch中继SIP账号通过Rest接口前言上一篇章《蓝牙电话-与FreeSwitch服务器和UA坐席的通话.docx》中,我们使用开源的B2B-UA当中经典的FreeSWIT...

技术分享|Sip与WebRTC互通-SRProxy开源库讲解

SRProxy介绍目前WebRTC协议跟SIP协议互通场景主要运用在企业呼叫中心、企业内部通信、电话会议(PSTN)、智能门禁等场景,要想让WebRTC与SIP互通,要解决两个层面的...

全网第N篇SIP协议之GB28181注册 JAVA版本

鉴于网上大部分关于SIP注册服务器编写都是C/C++/python,故开此贴,JAVA实现也贴出分享GB28181定义了了基于SIP架构的视频监控互联规范,而对于多数私有协议实现的监控系统...

「linux专栏」top命令用法详解,再也不怕看不懂top了

在linux系统中,我们经常使用到的一个命令就是top,它主要是用来显示系统运行中所有的进程和进程对应资源的使用等信息,所有的用户都可以使用top命令。top命令内容量丰富,可令使用者头疼的是无法全部...

取消回复欢迎 发表评论:

请填写验证码