configure配置安装详解

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]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]   //默认情况下/usr/local

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' 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]//默认在/usr/local/bin
  --sbindir=DIR           system admin executables [EPREFIX/sbin]//usr/local/bin
  --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/qrencode]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:  //项目名称
  --program-prefix=PREFIX            prepend PREFIX to installed program names  //在项目名添加前缀
  --program-suffix=SUFFIX            append SUFFIX to installed program names //在项目名添加后缀
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names //

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

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]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-static[=PKGS]  build static libraries [default=no]
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-thread-safety  make the library thread-safe. [default=yes]
  --disable-sdltest       Do not try to compile and run a test SDL program
  --disable-rpath         do not hardcode runtime library paths
  --enable-gprof          generate extra code to write profile information
                          suitable for gprof [default=no]
  --enable-gcov           generate extra code to write coverage information
                          suitable for gcov [default=no]
  --enable-mudflap        generate extra code to check memory leaks
                          [default=no]

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                          both]
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-sysroot=DIR Search for dependent libraries within DIR
                        (or the compiler's sysroot if not specified).
  --with-tools            build utility tools [default=yes]
  --with-tests            build tests [default=no]
  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)
  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
  --without-libiconv-prefix     don't search for libiconv in includedir and libdir

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  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
  png_CFLAGS  C compiler flags for png, overriding pkg-config
  png_LIBS    linker flags for png, overriding pkg-config

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.


--cache-file=FILE
   'configure'会在你的系统上测试存在的特性(或者bug!).为了加速随后进行的配置,测试的结果会存储在一个cache file里.当configure一个每个子树里都有'configure'脚本的复杂的源码树时,一个很好的cache file的存在会有很大帮助.
--help
     输出帮助信息.即使是有经验的用户也偶尔需要使用使用'--help'选项,因为一个复杂的项目会包含附加的选项.例如,GCC包里的'configure'脚本就包含了允许你控制是否生成和在GCC中使用GNU汇编器的选项.
--no-create
     'configure'中的一个主要函数会制作输出文件.此选项阻止'configure'生成这个文件.你可以认为这是一种演习(dry run),尽管缓存(cache)仍然被改写了.
--quiet/--silent
    当'configure'进行他的测试时,会输出简要的信息来告诉用户正在作什么.这样作是因为'configure'可能会比较慢,没有这种输出的话用户将会被扔在一旁疑惑正在发生什么.使用这两个选项中的任何一个都会把你扔到一旁.(译注:这两句话比较有意思,原文是这样的:If there was no such output, the user would be left wondering what is happening. By using this option, you too can be left wondering!)
--version
    打印用来产生'configure'脚本的Autoconf的版本号.
--prefix=PREFIX
    '--prefix'是最常用的选项.制作出的'Makefile'会查看随此选项传递的参数,当一个包在安装时可以彻底的重新安置他的结构独立部分. 举一个例子,当安装一个包,例如说Emacs,下面的命令将会使Emacs Lisp file被安装到"/opt/gnu/share": $ ./configure --prefix=/opt/gnu
--exec-prefix=EPREFIX
    与'--prefix'选项类似,但是他是用来设置结构倚赖的文件的安装位置.编译好的'emacs'二进制文件就是这样一个文件.如果没有设置这个选项的话,默认使用的选项值将被设为和'--prefix'选项值一样.
--bindir=DIR
    指定二进制文件的安装位置.这里的二进制文件定义为可以被用户直接执行的程序.
--sbindir=DIR
    指定超级二进制文件的安装位置.这是一些通常只能由超级用户执行的程序.
--libexecdir=DIR
    指定可执行支持文件的安装位置.与二进制文件相反,这些文件从来不直接由用户执行,但是可以被上面提到的二进制文件所执行.
--datadir=DIR
    指定通用数据文件的安装位置.
--sysconfdir=DIR
    指定在单个机器上使用的只读数据的安装位置.
--sharedstatedir=DIR
    指定可以在多个机器上共享的可写数据的安装位置.
--localstatedir=DIR
    指定只能单机使用的可写数据的安装位置.
--libdir=DIR
    指定库文件的安装位置.
--includedir=DIR
    指定C头文件的安装位置.其他语言如C++的头文件也可以使用此选项.
--oldincludedir=DIR
    指定为除GCC外编译器安装的C头文件的安装位置.
--infodir=DIR
    指定Info格式文档的安装位置.Info是被GNU工程所使用的文档格式.
--mandir=DIR
    指定手册页的安装位置.
--srcdir=DIR
    这个选项对安装没有作用.他会告诉'configure'源码的位置.一般来说不用指定此选项,因为'configure'脚本一般和源码文件在同一个目录下.
--program-prefix=PREFIX
    指定将被加到所安装程序的名字上的前缀.例如,使用'--program-prefix=g'来configure一个名为'tar'的程序将会使安装的程序被命名为'gtar'.当和其他的安装选项一起使用时,这个选项只有当他被XXXX文件使用时才会工作.
--program-suffix=SUFFIX
    指定将被加到所安装程序的名字上的后缀.
--program-transform-name=PROGRAM
   这里的PROGRAM是一个sed脚本.当一个程序被安装时,他的名字将经过`sed -e PROGRAM'来产生安装的名字.
--build=BUILD
   指定软件包安装的系统平台.如果没有指定,默认值将是'--host'选项的值.
--host=HOST
   指定软件运行的系统平台.如果没有指定,将会运行`config.guess'来检测.
--target=GARGET
    指定软件面向(target to)的系统平台.这主要在程序语言工具如编译器和汇编器上下文中起作用.如果没有指定,默认将使用'--host'选项的值.
--disable-FEATURE
    一些软件包可以选择这个选项来提供为大型选项的编译时配置,例如使用Kerberos认证系统或者一个实验性的编译器最优配置.如果默认是提供这些特性,可以使用'--disable-FEATURE'来禁用它,这里'FEATURE'是特性的名字.例如: $ ./configure --disable-gui
-enable-FEATURE[=ARG]
   相反的,一些软件包可能提供了一些默认被禁止的特性,可以使用'--enable-FEATURE'来起用它.这里'FEATURE'是特性的名字.一个特性可能会接受一个可选的参数.例如: $ ./configure --enable-buffers=128 `--enable-FEATURE=no'与上面提到的'--disable-FEATURE'是同义的.

--enable-static:生成静态链接库
--enable-shared:生成动态链接库

--with-PACKAGE[=ARG]
    在自由软件社区里,有使用已有软件包和库的优秀传统.当用'configure'来配置一个源码树时,可以提供其他已经安装的软件包的信息.例如, 倚赖于Tcl和Tk的BLT器件工具包.要配置BLT,可能需要给'configure'提供一些关于我们把Tcl和Tk装的何处的信息: $ ./configure --with-tcl=/usr/local --with-tk=/usr/local '--with-PACKAGE=no'与下面将提到的'--without-PACKAGE'是同义的.
--without-PACKAGE
    有时候你可能不想让你的软件包与系统已有的软件包交互.例如,你可能不想让你的新编译器使用GNU ld.通过使用这个选项可以做到这一点: $ ./configure --without-gnu-ld
--x-includes=DIR
    这个选项是'--with-PACKAGE'选项的一个特例.在Autoconf最初被开发出来时,流行使用'configure'来作为 Imake的一个变通方法来制作运行于X的软件.'--x-includes'选项提供了向'configure'脚本指明包含X11头文件的目录的方法.
--x-libraries=DIR



  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Nagios的安装配置可以按照以下步骤进行: 1. 首先,确保你的系统是Linux或者其他Nagios支持的系统。此外,安装Nagios之前,你需要安装Apache(http服务),因为它提供了一个直观的界面来查看监控信息。你可以在网上找到关于Apache的安装教程。 2. 安装完Apache之后,你需要下载Nagios的安装包并解压。你可以从Nagios官方网站下载最新的稳定版本。 3. 解压后,进入解压后的目录,执行以下命令来编译和安装Nagios: ``` ./configure --with-command-group=nagcmd make all sudo make install sudo make install-init sudo make install-config sudo make install-commandmode ``` 4. 安装完成后,你需要进行一些配置。首先,你需要编辑Nagios的配置文件,该文件位于`/usr/local/nagios/etc`目录下。你可以使用官方提供的示例配置文件作为起点,该文件已经安装在该目录下。你只需要做一处修改,即将`cfg_dir`的值设置为你自己的配置文件目录。 5. 接下来,你需要创建你自己的配置文件目录,并在该目录下创建你的主机和服务配置文件。你可以参考官方文档或者其他教程来了解如何编写这些配置文件。 6. 配置文件准备好后,你需要检查配置文件是否正确。你可以使用以下命令来检查配置文件: ``` sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg ``` 7. 如果没有错误,你可以启动Nagios服务: ``` sudo service nagios start ``` 8. 现在,你可以通过浏览器访问Nagios的Web界面,输入你的服务器的IP地址或域名,然后登录。你将能够查看监控信息和配置监控项。 这是一个简单的Nagios安装配置的步骤概述。具体的安装配置细节可能会因系统版本和个人需求而有所不同。你可以参考Nagios官方文档和其他教程来获取更详细的信息和指导。 #### 引用[.reference_title] - *1* *3* [nagios安装配置详解1](https://blog.csdn.net/weixin_34138139/article/details/92970215)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [nagios安装配置](https://blog.csdn.net/giveme38/article/details/84524806)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值