设为首页 收藏本站
查看: 405|回复: 0

[经验分享] apache configure

[复制链接]

尚未签到

发表于 2016-12-29 08:15:39 | 显示全部楼层 |阅读模式
  APACHE CONFIGURATION
  Apache 1.3 Autoconf-style Interface (APACI)
  ===========================================
  APACI is an Autoconf-style interface for the Unix side of the Apache 1.3
  HTTP server source distribution. It is actually not GNU Autoconf-based, i.e.
  the GNU Autoconf package itself is not used. Instead APACI just provides a
  similar batch configuration interface and a corresponding out-of-the-box
  build and installation procedure.
  The basic goal is to provide the following commonly known and expected
  procedure for out-of-the-box building and installing a package like Apache:
  $ gunzip <apache_1.3.X.tar.gz | tar xvf -
  $ ./configure --prefix=PREFIX [...]
  $ make
  $ make install
  NOTE: PREFIX is not the string "PREFIX". Instead use the Unix
  filesystem path under which Apache should be installed. For
  instance use "/usr/local/apache" for PREFIX above.
  After these steps Apache 1.3 is completely installed under PREFIX and
  already initially configured, so you can immediately fire it up the first
  time via
  $ PREFIX/sbin/apachectl start
  to get your first success event with the Apache HTTP server without having
  to fiddle around with various options for a long time. On the other hand
  APACI provides a lot of options to adjust the build and installation process
  for flexibly customizing your Apache installation. So, APACI provides both:
  Out-of-the-box building and installation for the impatient and powerful
  custom configuration for the experts.
  Detailed Description
  ====================
  For a detailed description of all available APACI options please read the
  file INSTALL or at least run the command
  $ ./configure --help
  for a compact one-page summary of the possibilities you have.
  Alternatively, you can start from the following examples.
  Examples
  ========
  In the following typical or even interesting variants of the available
  configuration steps are shown to give you an impression what APACI is good
  for and what APACI can do for you to be able to install Apache without much
  pain.
  Standard installation
  ---------------------
  The standard installation is done via
  $ ./configure --prefix=/path/to/apache
  $ make
  $ make install
  This builds Apache 1.3 with the standard set of enabled modules
  (automatically determined from src/Configuration.tmpl) with an Apache 1.2
  conforming subdirectory layout under /path/to/apache. For using the GNU
  style subdirectory layout additionally use the --with-layout=GNU option:
  $ ./configure --with-layout=GNU --prefix=/path/to/apache
  $ make
  $ make install
  If you are not sure which directory layout you want, you can use the
  --show-layout option. It displays the directory layout which would be used
  but immediately exits without configuring anything. Examples:
  $ ./configure --show-layout
  $ ./configure --prefix=/path/to/apache --show-layout
  $ ./configure --with-layout=GNU --prefix=/path/to/apache --show-layout
  Additionally if some of the shown paths still don't fit for your particular
  situation, you can use the --bindir, --sbindir, --libexecdir, --mandir,
  --sysconfdir, --datadir, --localstatedir, --runtimedir, --logfiledir and
  --proxycachedir options to adjust the layout as required. Always check with
  --show-layout the resulting directory layout which would be used for
  installation.
  suEXEC support
  --------------
  The suEXEC feature of Apache provides a mechanism to run CGI and SSI
  programs under the user and group id of the owner of the program. It is
  neither installed nor configured per default for Apache 1.3, but APACI
  supports it with additional options:
  $ ./configure --prefix=/path/to/apache \
  --enable-suexec \
  --suexec-caller=www \
  --suexec-userdir=.www \
  --suexec-docroot=/path/to/root/dir \
  --suexec-logfile=/path/to/logdir/suexec_log \
  --suexec-uidmin=1000 \
  --suexec-gidmin=1000 \
  --suexec-safepath="/bin:/usr/bin"
  $ make
  $ make install
  This automatically builds and installs Apache 1.3 with suEXEC support for
  the caller uid "www" and the user's homedir subdirs ".www". The default
  paths for --suexec-docroot is the value from the --datadir option with
  the suffix "/htdocs" and the --logfiledir value with the suffix
  "/suexec_log" for the --suexec-logfile option. The access paths for the
  suexec program are automatically adjusted and the suexec program is
  installed, so Apache can find it on startup.
  Building multiple platforms in parallel
  ---------------------------------------
  When you want to compile Apache for multiple platforms in parallel it is
  useful to share the source tree (usually via NFS, AFS or DFS) but build the
  object files in separated subtrees. This can be accomplished by letting
  APACI create a source shadow tree and build there:
  $ ./configure --shadow --prefix=/path/to/apache
  $ make
  $ make install
  Then APACI first determines the GNU platform triple, creates a shadow tree
  in src.<gnu-triple> plus corresponding Makefile.<gnu-triple> and then
  performs the complete build process inside this shadow tree.
  Dynamic Shared Object (DSO) support
  -----------------------------------
  Apache 1.3 supports building modules as shared objects on all major Unix
  platforms (see section "Supported Platforms" in document
  htdocs/manual/dso.html for details). APACI has a nice way of enabling the
  building of DSO-based modules and automatically installing them:
  $ ./configure --prefix=/path/to/apache \
  --enable-module=rewrite \
  --enable-shared=rewrite
  $ make
  $ make install
  This builds and installs Apache with the default configuration except that
  it adds the mod_rewrite module and automatically builds and installs it as a
  DSO, so it is optionally available for loading under runtime. To make your
  life even more easy APACI additionally inserts a corresponding `LoadModule'
  line into the httpd.conf file in the installation phase.
  APACI also supports a variant of the --enable-shared option:
  $ ./configure --prefix=/path/to/apache \
  --enable-shared=max
  $ make
  $ make install
  This enables shared object building for the maximum of modules, i.e. all
  enabled modules (--enable-module or the default set) except for mod_so
  itself (the bootstrapping module for DSO support). So, to build a
  full-powered Apache with maximum flexibility by building and installing most
  of the modules, you can use:
  $ ./configure --prefix=/path/to/apache \
  --enable-module=most \
  --enable-shared=max
  $ make
  $ make install
  This first enables most of the modules (all modules except some problematic
  ones like mod_auth_db which needs third party libraries not available on
  every platform or mod_log_agent and mod_log_referer which are deprecated)
  and then enables DSO support for all of them. This way you get all these
  modules installed and you then can decide under runtime (via the
  `LoadModule') directives which ones are actually used. This is especially
  useful for vendor package maintainers to provide a flexible Apache package.
  On-the-fly added additional/private module
  ------------------------------------------
  For Apache there are a lot of modules flying around on the net which solve
  particular problems. For a good reference see the Apache Module Registory at
  http://modules.apache.org/ and the Apache Group's contribution directory at
  http://www.apache.org/dist/contrib/modules/. These modules usually come in a
  file named mod_foo.c. APACI supports adding these sources on-the-fly to the
  build process:
  $ ./configure --prefix=/path/to/apache \
  --add-module=/path/to/mod_foo.c
  $ make
  $ make install
  This automatically copies mod_foo.c to src/modules/extra/, activates it in
  the configuration and builds Apache with it. A very useful way is to combine
  this with the DSO support:
  $ ./configure --prefix=/path/to/apache \
  --add-module=/path/to/mod_foo.c \
  --enable-shared=foo
  $ make
  $ make install
  This builds and installs Apache with the default set of modules, but
  additionally builds mod_foo as a DSO and adds a `LoadModule' line to the
  httpd.conf file to activate it for loading under runtime.
  Apache and mod_perl
  -------------------
  The Apache/Perl integration project (http://perl.apache.org/) from Doug
  MacEachern <dougm@perl.apache.org> is a very powerful approach to integrate
  a Perl 5 interpreter into the Apache HTTP server both for running Perl
  programs and for programming Apache modules in Perl. The distribution
  mod_perl-1.XX.tar.gz can be found on http://perl.apache.org/src/. Here is
  how you can build and install Apache with mod_perl:
  $ gunzip <apache_1.3.X.tar.gz | tar xvf -
  $ gunzip <mod_perl-1.XX.tar.gz | tar xvf -
  $ cd mod_perl-1.XX
  $ perl Makefile.PL APACHE_SRC=../apache_1.3.X/src \
  DO_HTTPD=1 USE_APACI=1 \
  [EVERYTHING=1 ...]
  $ make
  $ make install
  [optionally you now have the chance to prepare or add more
  third-party modules to the Apache source tree]
  $ cd ../apache_1.3.X
  $ ./configure --prefix=/path/to/apache \
  --activate-module=src/modules/perl/libperl.a \
  [--enable-shared=perl]
  $ make
  $ make install
  Apache and PHP
  --------------
  The PHP language (http://www.php.net) is an HTML-embedded scripting language
  which can be directly integrated into the Apache HTTP server for powerful HTML
  scripting. The package can be found at http://www.php.net/downloads.php
  1. How you can install Apache with a statically linked PHP:
  $ gunzip <apache_1.3.X.tar.gz | tar xvf -
  $ gunzip <php-3.0.tar.gz | tar xvf -
  $ cd apache_1.3.X
  $ ./configure --prefix=/path/to/apache
  $ cd ../php-3.0
  $ ./configure --with-apache=../apache_1.3.X
  $ make
  $ make install
  [optionally you now have the chance to prepare or add more
  third-party modules to the Apache source tree]
  $ cd ../apache_1.3.X
  $ ./configure --prefix=/path/to/apache \
  --activate-module=src/modules/php3/libphp3.a
  $ make
  $ make install
  2. You can also use APXS:
  $ cd apache-1.3.X
  $ ./configure --prefix=/path/to/apache --enable-shared=max
  $ make
  $ make install
  $ cd php-3.0.X
  $ ./configure --with-apxs=/path/to/apache/bin/apxs \
  --with-config-file-path=/path/to/apache
  $ make
  $ make install
  At this point don't forget to edit your conf/httpd.conf file and
  make sure the file contains the line for PHP 3:
  AddType application/x-httpd-php3 .php3
  Or this line for PHP 4:
  AddType application/x-httpd-php .php
  Then restart your server.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-320791-1-1.html 上篇帖子: 安装 Apache 下篇帖子: apache urlrewriter
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表