/boot
/etc
/usr
/var
/dev
/lib
/tmp
/bin
/sbin
/proc
/sys
/mnt
/media
/home
/root
/misc
/opt
/srv
/usr/share/man
/etc, /bin, /sbin, /lib
系统启动就需要用到的程序,这些目录不能挂载额外的分区,必须在根文件系统的分区上
/usr/
操作系统核心功能,可以单独分区
单独分区,系统重装不影响软件使用
bin
sbin
lib
/usr/local
第三方软件
bin
sbin
lib
etc
man
/opt
/proc
/sys
不能单独分区,默认为空;
/dev: 设备,不能单独分区;
udev
/root: 不能单独分区
/var:建议单独分区
/boot:内核,initrd(initramfs)
内核:
POST-->BIOS(HD)-->(MBR)bootloader(文件系统结构,ext2, ext3, xfs)-->内核
软件包管理器的核心功能:
1、制作软件包;
2、安装、卸载、升级、查询、校验;
Redhat, SUSE, Debian
Redhat, SUSE: RPM
Redhat Package Manager
PRM is Package Manager
Debian: dpt
依赖关系:
X-->Y-->Z
X-->Y-->Z
前端工具:yum, apt-get
后端工具:RPM, dpt
yum: Yellowdog Update Modifier
yum
rpm命令:
rpm:
数据库:/var/lib/rpm
rpmbuild:
安装、查询、卸载、升级、校验、数据库的重建、验正数据包等工作;
rpm命名:
包:组成部分
主包:
bind-9.7.1-1.el5.i586.rpm
子包:
bind-libs-9.7.1-1.el5.i586.rpm
bind-utils-9.7.1-1.el5.i586.rpm
包名格式:
name-version-release.arch.rpm
bind-major.minor.release-release.arch.rpm
主版本号:重大改进
次版本号:某个子功能发生重大变化
发行号:修正了部分bug,调整了一点功能
[ ~]# uname -r
2.6.32-504.el6.x86_64
[ ~]# uname -a
Linux localhost 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[ ~]#
bind-9.7.1.tar.gz
rpm包:
二进制格式
rpm包作者下载源程序,编译配置完成后,制作成rpm包
bind-9.7.1-1.noarch.rpm
bind-9.7.1-1.ppc.rpm
rpm:
1、安装
rpm -i /PATH/TO/PACKAGE_FILE
-h: 以#显示进度;每个#表示2%;
-v: 显示详细过程
-vv: 更详细的过程
rpm -ivh /PATH/TO/PACKAGE_FILE
--nodeps: 忽略依赖关系;
--replacepkgs: 重新安装,替换原有安装;
--force: 强行安装,可以实现重装或降级;
2、查询
rpm -q PACKAGE_NAME: 查询指定的包是否已经安装
rpm -qa : 查询已经安装的所有包
rpm -qi PACKAGE_NAME: 查询指定包的说明信息;
rpm -ql PACKAGE_NAME: 查询指定包安装后生成的文件列表;
rpm -qc PACEAGE_NEME:查询指定包安装的配置文件;
rpm -qd PACKAGE_NAME: 查询指定包安装的帮助文件;
rpm -q --scripts PACKAGE_NAME: 查询指定包中包含的脚本
rpm -qf /path/to/somefile: 查询指定的文件是由哪个rpm包安装生成的;
如果某rpm包尚未安装,我们需查询其说明信息、安装以后会生成的文件;
rpm -qpi /PATH/TO/PACKAGE_FILE
rpm -qpl
3、升级
rpm -Uvh /PATH/TO/NEW_PACKAGE_FILE: 如果装有老版本的,则升级;否则,则安装;
rpm -Fvh /PATH/TO/NEW_PACKAGE_FILE:如果装有老版本的,则升级;否则,退出;
--oldpackage: 降级
4、卸载
rpm -e PACKAGE_NAME
--nodeps
5、校验
rpm -V PACKAGE_NAME
6、重建数据库
rpm
--rebuilddb: 重建数据库,一定会重新建立;
--initdb:初始化数据库,没有才建立,有就不用建立;
7、检验来源合法性,及软件包完整性;
加密类型:
对称:加密解密使用同一个密钥
公钥:一对儿密钥,公钥,私钥;公钥隐含于私钥中,可以提取出来,并公开出去;
单向:
# ls /etc/pki/rpm-gpg/
RPM-GPG-KEY-redhat-release
rpm -K /PAPT/TO/PACKAGE_FILE
dsa, gpg: 验正来源合法性,也即验正签名;可以使用--nosignature,略过此项
sha1, md5: 验正软件包完整性;可以使用--nodigest,略过此项
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release: 导入密钥文件
HTML: HyperText Mark Language
XML: eXtended Mark Language
XML, JSON: 半结构化的数据
yum仓库中的元数据文件:
primary.xml.gz
所有RPM包的列表;
依赖关系;
每个RPM安装生成的文件列表;
filelists.xml.gz(全局视角)
当前仓库中所有RPM包的所有文件列表;
other.xml.gz
额外信息,RPM包的修改日志;
repomd.xml
记录的是上面三个文件的时间戳和校验和;
comps*.xml: RPM包分组信息
[ ~]# cat /etc/yum.conf (查看yum仓库配置文件)
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
# This is the default, if you make this bigger yum won‘t see if the metadata
# is newer on the remote and so you‘ll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don‘t keep old packages around. If you don‘t like this checking
# interupting your command line usage, it‘s much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo (自行定义repo在/etc/yum.repos.d目录)
# in /etc/yum.repos.d
[ ~]#
[ ~]# ll /etc/yum.repos.d/
total 12
-rw-r--r--. 1 root root 125 Feb 21 20:39 packagekit-media.repo
-rw-r--r--. 1 root root 358 Jun 21 2015 redhat.repo
-rw-r--r--. 1 root root 529 Sep 15 2014 rhel-source.repo
[ ~]#
#[ ~]# cat /etc/yum.repos.d/rhel-source.repo (参考定义repo文件)
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ ~]#
如何为yum定义repo文件
[Repo_ID]
name=Description (自定义yum仓库名称)
baseurl= (自定义yum仓库路径)
ftp:// (ftp服务器)
http:// (web服务器)
(本地文件路径)
enabled={1|0} (确认当前仓库是否使用)
gpgcheck={1|0} (校验是否合法)
gpgkey= (校验算法,如果gpgcheck开启,需要填写;)
[ yum.repos.d]# yum list | grep ree
freetype.x86_64 2.3.11-14.el6_3.1 @anaconda-RedHatEnterpriseLinux-201409260744.x86_64/6.6
gnome-screensaver.x86_64 2.28.3-28.el6 @anaconda-RedHatEnterpriseLinux-201409260744.x86_64/6.6
gstreamer-plugins-bad-free.x86_64 0.10.19-3.el6_5 @anaconda-RedHatEnterpriseLinux-201409260744.x86_64/6.6
nss-softokn-freebl.x86_64 3.14.3-17.el6 @anaconda-RedHatEnterpriseLinux-201409260744.x86_64/6.6
paktype-tehreer-fonts.noarch 2.0-8.el6 @anaconda-RedHatEnterpriseLinux-201409260744.x86_64/6.6
sound-theme-freedesktop.noarch 0.7-3.el6 @anaconda-RedHatEnterpriseLinux-201409260744.x86_64/6.6
thai-scalable-waree-fonts.noarch 0.4.12-2.1.el6 @anaconda-RedHatEnterpriseLinux-201409260744.x86_64/6.6
z-push.noarch 2.2.9-1.el5.centos Free
z-push-autodiscover.noarch 2.2.9-1.el5.centos Free
z-push-combined.noarch 2.2.9-1.el5.centos Free
z-push-imap.noarch 2.2.9-1.el5.centos Free
z-push-maildir.noarch 2.2.9-1.el5.centos Free
z-push-searchldap.noarch 2.2.9-1.el5.centos Free
z-push-vcarddir.noarch 2.2.9-1.el5.centos Free
z-push-zarafa.noarch 2.2.9-1.el5.centos Free
repolist: 显示repo列表及其简要信息
all
enabled: 默认
disabled
[ yum.repos.d]# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name status
Free netrpm 8
Nofree netrpm 0
repolist: 8
[ yum.repos.d]#
[ yum.repos.d]# yum repolist disable
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repolist: 0
[ yum.repos.d]#
list: 列表
支持glob
all
available:可用的,仓库中有但尚未安装的
installed: 已经安装的
updates: 可用的升级
provides| whatprovides: 查看指定的文件或特性是由哪个包安装生成的;
[ yum.repos.d]# yum provides /etc/inittab
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
initscripts-9.03.46-1.el6.x86_64 : The inittab file and the /etc/init.d scripts
Repo : installed
Matched from:
Other : Provides-match: /etc/inittab
groupinfo
[ yum.repos.d]# yum grouplist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Group Process
Free/group_gz | 1.4 kB 00:00
Nofree/group_gz | 1.4 kB 00:00
Available Groups:
Base (RPM Fusion Free)
GNOME Desktop Environment (RPM Fusion Free)
Hardware Support (RPM Fusion Free)
Internet (RPM Fusion Free)
KDE (K Desktop Environment) (RPM Fusion Free)
Miscellaneous command line tools (RPM Fusion Free)
Sound and Video (RPM Fusion Free)
Done
[ yum.repos.d]#
grouplist
groupinstall
groupremove
groupupdate
如何创建yum仓库:
createrepo /YYY (没有组的定义)
comps-rhel5-vt.xml(组信息)
createrepo -g /xxx/comps-rhel5-vt.xml /YYY
主要提供三种格式的mysql包:rpm格式、二进制格式、源码格式:(tar打包,gz压缩)
rpm格式: libjpeg-devel-6b-33.x86_64.rpm #rpm格式很好区分,
二进制包: mysql-3.23.58-pc-linux-i686.tar.gz #二进制格式的包名字很长,有版本号、适应平台、适应的硬件类型等,格式:mysql-<版本>-<OS>-tar.gz
源码包: php-5.2.14.tar.gz #而源码格式仅仅就是一个版本号的tar包。#cj 安装区别:解压、./config、make、make install
source code 是程序员写的码,
binary code 是机器跑的码。
source code 得经过 compile 才能成为 binary code 。
RPM 有分兩種:binary rpm 跟 source rpm 。
前者是編好的 binary ,安裝就可用。
後者是還沒編好的 source ,需 rebuild 之後才能安裝
源代码方式和二进制包是软件包的两种形式。二进制包里面包括了已经经过编译,可以马上运行的程序。你只需要下载和解包(安装)它们以后,就马上可以使用。源代码包里面包括了程序原始的程序代码,需要在你的计算机上进行编译以后才可以产生可以运行程序,所以从源代码安装的时间会比较长。
Linux下有个命令叫file,因为Linux并不是按照后缀名来判断文件类型的。所以一般在不清楚文件到底是什么类型的时候,就用file这个命令去判断。
file php-5.2.14.tar.gz
php-5.2.14.tar.gz: gzip compressed data, was "php-5.2.14.tar", from Unix, last modified: Wed Jul 21 22:32:34 2010, max compression
这个php-5.2.14.tar.gz 明显是个gzip的压缩包,这样的文件一般都是用tar zxvf 命令去解包然后去配置编译安装的,通常情况把这种安装方法叫做源码编译安装。
file libjpeg-devel-6b-33.x86_64.rpm
libjpeg-devel-6b-33.x86_64.rpm: RPM v3 bin i386 libjpeg-devel-6b-33
这个libjpeg-devel-6b-33.x86_64.rpm 文件,就是个标准的redhat系列发行版本所用的RPM格式软件包。一般在RHEL、CentOS、SUSE、OracleLinux下都可以安装类似的RPM包。标准的安装方法是rpm -ivh。
基本上红帽系列Linux发行版本安装软件就这两种方法了。还有经常被提起的yum,其实就是由yum自动判断rpm包的依赖,然后一次性把所有需要安装的N个rpm统一下载安装,其实原理和一个个的安装rpm没有什么本质区别。
一般在官网上下载的源码包都是以:tar.gz tar.bz2结尾的,经过编译的一般是以.rpm来结尾的,linux下的文件扩展名没有实际的意义,这样做只是为了方便你去查看是什么类型的包然后采取什么样的方式去安装和配置,当然有时候并不能从文件的扩展名去查看什么类型的包,因为文件名可以随意的去修改可以使用file这个命令去查看文件包的类型.
源码的安装一般由3个步骤组成:配置(configure)、编译(make)、安装(make install)。
Configure是一个可执行脚本,它有很多选项,在待安装的源码路径下使用命令./configure –help输出详细的选项列表。
其中--prefix选项是配置安装的路径,如果不配置该选项,安装后可执行文件默认放在/usr /local/bin,库文件默认放在/usr/local/lib,配置文件默认放在/usr/local/etc,其它的资源文件放在/usr /local/share,比较凌乱。
如果配置--prefix,如:
./configure --prefix=/usr/local/test
可以把所有资源文件放在/usr/local/test的路径中,不会杂乱。
用了—prefix选项的另一个好处是卸载软件或移植软件。当某个安装的软件不再需要时,只须简单的删除该安装目录,就可以把软件卸载得干干净净;移植软件只需拷贝整个目录到另外一个机器即可(相同的操作系统)。
当然要卸载程序,也可以在原来的make目录下用一次make uninstall,但前提是make文件指定过uninstall。
下载源码包
wget
[ ~]# tar xf httpd-2.2.32.tar.gz
[ ~]# cd httpd-2.2.32
[ httpd-2.2.32]# ll
total 1172
-rw-r--r--. 1 1001 1001 14882 Nov 21 2004 ABOUT_APACHE
-rw-r--r--. 1 1001 1001 18613 Jul 6 2012 acinclude.m4
-rw-r--r--. 1 1001 1001 56952 Oct 5 2010 Apache.dsw
drwxr-xr-x. 6 1001 1001 4096 Jan 9 09:36 build
-rw-r--r--. 1 1001 1001 2644 Aug 23 2007 BuildAll.dsp
-rw-r--r--. 1 1001 1001 2692 Jul 29 2009 BuildBin.dsp
-rwxr-xr-x. 1 1001 1001 5786 Sep 19 2012 buildconf
-rw-r--r--. 1 1001 1001 146529 Jan 9 08:23 CHANGES
-rw-r--r--. 1 1001 1001 11701 Feb 27 2012 config.layout
-rwxr-xr-x. 1 1001 1001 574593 Jan 9 09:36 configure
-rw-r--r--. 1 1001 1001 24720 May 25 2015 configure.in
drwxr-xr-x. 9 1001 1001 4096 Jan 9 09:36 docs
-rw-r--r--. 1 1001 1001 403 Nov 21 2004 emacs-style
-rw-r--r--. 1 1001 1001 1248 May 6 2011 httpd.dep
-rw-r--r--. 1 1001 1001 4124 Jun 11 2008 httpd.dsp
-rw-r--r--. 1 1001 1001 8994 May 6 2011 httpd.mak
-rw-r--r--. 1 1001 1001 12053 Jan 9 09:36 httpd.spec
drwxr-xr-x. 2 1001 1001 4096 Jan 9 09:36 include
-rw-r--r--. 1 1001 1001 5129 Jan 9 08:33 INSTALL
-rw-r--r--. 1 1001 1001 2909 Dec 7 2006 InstallBin.dsp
-rw-r--r--. 1 1001 1001 5145 Nov 29 2005 LAYOUT
-rw-r--r--. 1 1001 1001 30119 May 6 2011 libhttpd.dep
-rw-r--r--. 1 1001 1001 17039 Jan 12 2007 libhttpd.dsp
-rw-r--r--. 1 1001 1001 28503 May 6 2011 libhttpd.mak
-rw-r--r--. 1 1001 1001 28690 Jan 18 2008 LICENSE
-rw-r--r--. 1 1001 1001 8739 Nov 25 2008 Makefile.in
-rw-r--r--. 1 1001 1001 34759 Jan 19 2014 Makefile.win
drwxr-xr-x. 20 1001 1001 4096 Jan 9 09:36 modules
-rw-r--r--. 1 1001 1001 828 Jan 2 08:16 NOTICE
-rw-r--r--. 1 1001 1001 12894 Mar 15 2012 NWGNUmakefile
drwxr-xr-x. 9 1001 1001 4096 Jan 9 09:36 os
-rw-r--r--. 1 1001 1001 5954 Jan 9 2007 README
-rw-r--r--. 1 1001 1001 4178 Aug 27 2014 README.platforms
-rw-r--r--. 1 1001 1001 2553 Dec 20 2010 README-win32.txt
-rw-r--r--. 1 1001 1001 10183 Mar 13 2005 ROADMAP
drwxr-xr-x. 3 1001 1001 4096 Jan 9 09:36 server
drwxr-xr-x. 5 1001 1001 4096 Jan 9 09:36 srclib
drwxr-xr-x. 4 1001 1001 4096 Jan 9 09:36 support
drwxr-xr-x. 2 1001 1001 4096 Jan 9 09:36 test
-rw-r--r--. 1 1001 1001 8183 Oct 17 2005 VERSIONING
[ httpd-2.2.32]#
[ httpd-2.2.32]# ./configure --help (查看可以支持的选项)
`configure‘ configures this package 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/apache2]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install‘ will install all the files in
`/usr/local/apache2/bin‘, `/usr/local/apache2/lib‘ etc. You can specify
an installation prefix other than `/usr/local/apache2‘ 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/PACKAGE]
--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]
--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-layout=LAYOUT
--enable-v4-mapped Allow IPv6 sockets to handle IPv4 connections
--enable-exception-hook Enable fatal exception hook
--enable-maintainer-mode
Turn on debugging and compile time warnings
--enable-pie Build httpd as a Position Independent Executable
--enable-modules=MODULE-LIST
Space-separated list of modules to enable | "all" |
"most"
--enable-mods-shared=MODULE-LIST
Space-separated list of shared modules to enable |
"all" | "most"
--disable-authn-file file-based authentication control
--enable-authn-dbm DBM-based authentication control
--enable-authn-anon anonymous user authentication control
--enable-authn-dbd SQL-based authentication control
--disable-authn-default authentication backstopper
--enable-authn-alias auth provider alias
--disable-authz-host host-based authorization control
--disable-authz-groupfile
‘require group‘ authorization control
--disable-authz-user ‘require user‘ authorization control
--enable-authz-dbm DBM-based authorization control
--enable-authz-owner ‘require file-owner‘ authorization control
--enable-authnz-ldap LDAP based authentication
--disable-authz-default authorization control backstopper
--disable-auth-basic basic authentication
--enable-auth-digest RFC2617 Digest authentication
--enable-isapi isapi extension support
--enable-file-cache File cache
--enable-cache dynamic file caching
--enable-disk-cache disk caching module
--enable-mem-cache memory caching module
--enable-dbd Apache DBD Framework
--enable-bucketeer buckets manipulation filter
--enable-dumpio I/O dump filter
--enable-echo ECHO server
--enable-example example and demo module
--enable-case-filter example uppercase conversion filter
--enable-case-filter-in example uppercase conversion input filter
--enable-reqtimeout Limit time waiting for request from client
--enable-ext-filter external filter module
--disable-include Server Side Includes
--disable-filter Smart Filtering
--enable-substitute response content rewrite-like filtering
--disable-charset-lite character set translation
--enable-charset-lite character set translation
--enable-deflate Deflate transfer encoding support
--enable-ldap LDAP caching and connection pooling services
--disable-log-config logging configuration
--enable-log-forensic forensic logging
--enable-logio input and output logging
--disable-env clearing/setting of ENV vars
--enable-mime-magic automagically determining MIME type
--enable-cern-meta CERN-type meta files
--enable-expires Expires header control
--enable-headers HTTP header control
--enable-ident RFC 1413 identity check
--enable-usertrack user-session tracking
--enable-unique-id per-request unique ids
--disable-setenvif basing ENV vars on headers
--disable-version determining httpd version in config files
--enable-proxy Apache proxy module
--enable-proxy-connect Apache proxy CONNECT module
--enable-proxy-ftp Apache proxy FTP module
--enable-proxy-http Apache proxy HTTP module
--enable-proxy-scgi Apache proxy SCGI module
--enable-proxy-ajp Apache proxy AJP module
--enable-proxy-balancer Apache proxy BALANCER module
--enable-ssl SSL/TLS support (mod_ssl)
--enable-distcache Select distcache support in mod_ssl
--enable-optional-hook-export
example optional hook exporter
--enable-optional-hook-import
example optional hook importer
--enable-optional-fn-import
example optional function importer
--enable-optional-fn-export
example optional function exporter
--enable-static-support Build a statically linked version of the support
binaries
--enable-static-htpasswd
Build a statically linked version of htpasswd
--enable-static-htdigest
Build a statically linked version of htdigest
--enable-static-rotatelogs
Build a statically linked version of rotatelogs
--enable-static-logresolve
Build a statically linked version of logresolve
--enable-static-htdbm Build a statically linked version of htdbm
--enable-static-ab Build a statically linked version of ab
--enable-static-checkgid
Build a statically linked version of checkgid
--enable-static-htcacheclean
Build a statically linked version of htcacheclean
--enable-static-httxt2dbm
Build a statically linked version of httxt2dbm
--enable-http HTTP protocol handling
--disable-mime mapping of file-extension to MIME
--enable-dav WebDAV protocol handling
--disable-status process/thread monitoring
--disable-autoindex directory listing
--disable-asis as-is filetypes
--enable-info server information
--enable-suexec set uid and gid for spawned processes
--disable-cgid CGI scripts
--enable-cgi CGI scripts
--disable-cgi CGI scripts
--enable-cgid CGI scripts
--enable-dav-fs DAV provider for the filesystem
--enable-dav-lock DAV provider for generic locking
--enable-vhost-alias mass virtual hosting module
--disable-negotiation content negotiation
--disable-dir directory request handling
--enable-imagemap server-side imagemaps
--disable-actions Action triggering on requests
--enable-speling correct common URL misspellings
--disable-userdir mapping of requests to user-specific directories
--disable-alias mapping of requests to different filesystem parts
--enable-rewrite rule based URL manipulation
--enable-so DSO capability
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-included-apr Use bundled copies of APR/APR-Util
--with-apr=PATH prefix for installed APR or the full path to
apr-config
--with-apr-util=PATH prefix for installed APU or the full path to
apu-config
--with-pcre=PATH Use external PCRE library
--with-port=PORT Port on which to listen (default is 80)
--with-sslport=SSLPORT Port on which to securelisten (default is 443)
--with-z=DIR use a specific zlib library
--with-sslc=DIR RSA SSL-C SSL/TLS toolkit
--with-ssl=DIR OpenSSL SSL/TLS toolkit
--with-mpm=MPM Choose the process model for Apache to use.
MPM={beos|event|worker|prefork|mpmt_os2|winnt}
--with-module=module-type:module-file
Enable module-file in the modules/
directory.
--with-program-name alternate executable name
--with-suexec-bin Path to suexec binary
--with-suexec-caller User allowed to call SuExec
--with-suexec-userdir User subdirectory
--with-suexec-docroot SuExec root directory
--with-suexec-uidmin Minimal allowed UID
--with-suexec-gidmin Minimal allowed GID
--with-suexec-logfile Set the logfile
--with-suexec-safepath Set the safepath
--with-suexec-umask umask for suexec‘d process
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L
nonstandard directory
LIBS libraries to pass to the linker, e.g. -l
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I
you have headers in a nonstandard directory
CPP C preprocessor
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 the package provider.
[ httpd-2.2.32]#
[ httpd-2.2.32]# ./configure --prefix=/usr/local/httpd
[BEGIN] 2017/3/4 22:42:28
[ httpd-2.2.32]# ./configure --prefix=/usr/local/httpd
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring Apache Portable Runtime library ...
checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring APR library
Platform: x86_64-unknown-linux-gnu
checking for working mkdir -p... yes
APR Version: 1.5.2
checking for chosen layout... apr
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
Applying APR hints file rules for x86_64-unknown-linux-gnu
setting CPPFLAGS to "-DLINUX -D_REENTRANT -D_GNU_SOURCE"
(Default will be unix)
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for gawk... gawk
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for rm... rm
checking for as... as
checking for cpp... cpp
checking for ar... ar
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking whether system uses EBCDIC... no
performing libtool configuration...
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1966080
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... rm: cannot remove `conftest*‘: No such file or directory
yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... rm: cannot remove `conftest*‘: No such file or directory
no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
Check for compiler flags...
checking whether the compiler provides atomic builtins... yes
checking whether to enable -D_LARGEFILE64_SOURCE... no
configure: Configured for Linux 2.6
Checking for libraries...
checking for library containing gethostbyname... none required
checking for library containing gethostname... none required
checking for library containing socket... none required
checking for library containing crypt... -lcrypt
checking for main in -ltruerand... no
checking for library containing modf... none required
Checking for Threads...
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for CFLAGS needed for pthreads... -pthread
adding "-pthread" to CFLAGS
checking for LIBS needed for pthreads... -lpthread
adding "-lpthread" to LIBS
checking for pthread.h... (cached) yes
checking whether pthread_getspecific takes two arguments... no
checking whether pthread_attr_getdetachstate takes one argument... no
checking for recursive mutex support... yes
checking for pthread_key_delete... yes
checking for pthread_rwlock_init... yes
checking for pthread_attr_setguardsize... yes
checking for pthread_yield... yes
checking for pthread_rwlock_t... yes
APR will use threads
checking for readdir in -lc_r... no
checking for gethostbyname in -lc_r... no
checking for gethostbyaddr in -lc_r... no
checking for getservbyname in -lc_r... no
checking for gethostbyname_r... yes
checking for gethostbyaddr_r... yes
checking for getservbyname_r... yes
checking for sigsuspend... yes
checking for sigwait... yes
checking for poll... yes
checking for kqueue... no
checking for port_create... no
checking for epoll support... yes
checking for epoll_create1 support... yes
checking for dup3 support... yes
checking for accept4 support... yes
checking for SOCK_CLOEXEC support... yes
checking for fdatasync... yes
checking for epoll_create1 support... (cached) yes
checking for asio -> message queue support... no
checking for dup3 support... (cached) yes
checking for accept4 support... (cached) yes
checking for SOCK_CLOEXEC support... (cached) yes
checking for getpwnam_r... yes
checking for getpwuid_r... yes
checking for getgrnam_r... yes
checking for getgrgid_r... yes
Checking for Shared Memory Support...
checking for library containing shm_open... -lrt
checking for sys/types.h... (cached) yes
checking sys/mman.h usability... yes
来源: http://www.bubuko.com/infodetail-1970649.html