注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

欢迎光临我的博客

 
 
 

日志

 
 

install perl_cgi to apache  

2011-01-09 11:17:31|  分类: 网站 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
 

B.1 Standard Installation

As described in the walk-through in Chapter 2, the standard way to build and install mod_perl is to run Makefile.PL with the following sequence of commands:

% perl Makefile.PL configuration options  % make  % make test  % make install

This will automatically build a mod_perl-embedded version of Apache and install it in the standard location. The configuration options you specify give you extensive control over the building and installation process.

B.1.1 Makefile.PL Options for mod_perl

There are several reasons for mod_perl 's bewildering number of configuration options. Many of the options came to be during the early days of mod_perl, when new options were frequently added in an "experimental" state. As these features matured and stabilized, their activation switches remained for those site administrators who do not want to expose certain areas of the API to programmers. By turning off unwanted features, sites can also reduce the size of the Apache executable somewhat, although this overhead is small compared to the size of the Perl runtime itself.

Most first-time users of the Perl API will want to configure mod_perl with the EVERYTHING=1 option in order to turn on all features. Later, when you've experimented with the API, you may decide to dispense with some features, and you can reconfigure the server with a more select set of options. Other recommended options are USE_APACI=1, to use the Apache AutoConf-style Interface (APACI), and APACHE_PREFIX=/server/root, to specify the location of the server root in which to install the mod_perl-enabled server and support files.

B.1.1.1 Options for controlling the build process

These options control the configuration and build process. Among other things, these options allow you to specify parameters that are passed through to Apache's configuration system.

USE_APACI=1

Tells mod_perl to configure Apache using the flexible Apache AutoConf-style Interface (APACI), rather than the older system, which required a file named src/Configuration to be edited. This option is recommended.

APACHE_PREFIX=/usr/local/apache

When USE_APACI is enabled, this attribute will specify the 梡refix option for Apache's configure script, specifying the installation path for Apache. When this option is used, mod_perl 's make install will also make install on the Apache side, installing the httpd binary and support tools, along with the configuration, log, and document trees.

APACI_ARGS="--option=val,--other-option=val"

Passes additional arguments to Apache's configure script. The argument list should be contained within single or double quotes and delimited by commas. Example:

% set runpath=/var/run/apache   % set logpath=/var/logs/apache   % perl Makefile.PL APACI_ARGS="--runtimedir=$runpath,--logfiledir=$logpath"
WITH_APXS=~www/bin/apxs

Tells mod_perl the location of the APache eXtenSion tool (apxs); see Chapter 2 under Section 2.5.1" and Appendix C . This is necessary if the binary cannot be found in the command path or in the location specified by APACHE_PREFIX.

USE_APXS=1

Tells mod_perl to build itself using the APache eXtenSion (apxs) tool. As described in Chapter 2, this tool is used to build C API modules in a way that is independent of the Apache source tree. mod_perl will look for apxs in the location specified by USE_APXS. If USE_APXS is not specified, mod_perl will check the bin and sbin directories relative to APACHE_PREFIX.

USE_DSO=1

Tells mod_perl to build itself as a dynamic shared object (DSO). Although this reduces the apparent size of the httpd executable on disk, it doesn't actually reduce its memory consumption. This is recommended only if you are going to be using the Perl API occasionally or if you wish to experiment with its features before you start using it in a production environment.

This feature was considered experimental at the time this book was written. Consult the mod_perl INSTALL.apaci file for details on using this option.

APACHE_SRC=/ ? path/ ? to/apache_ ? x.x.x/src ?

Tells mod_perl where the Apache source tree is located. You may need this if the Apache source tree is not in the immediate vicinity of the mod_perl directory.

SSL_BASE=/ ? path/ ? to/ssl ?

When building against a mod_ssl enabled server, this option tells Apache where to look for SSL include and lib subdirectories.

DO_HTTPD=1

Tells mod_perl to build the Apache server for you, skipping the interactive prompt. If APACHE_SRC is also specified, mod_perl will use its value. Otherwise, it will search the immediate vicinity of the mod_perl directory and use the first Apache source tree it finds.

ADD_MODULE=info,status,proxy

Specifies a list of optional Apache modules to configure into the server, delimited by a comma. For example, this command will enable the mod_info, mod_status, and mod_proxy modules:

% perl Makefile.PL ADD_MODULE=info,status,proxy
PREP_HTTPD=1

Tells mod_perl only to prepare Apache for building. Running the make command after this option is used will only build the Perl side of mod_perl. You will have to build httpd manually.

DYNAMIC=1

Tells mod_perl to build the Apache::* API extensions as shared libraries. The default action is to link these modules statically with the httpd executable. This can save some memory if you only occasionally use these API features. They are described briefly in this appendix and in more detail in Chapter 9.

PERL_TRACE=1

This option enables runtime diagnostics for mod_perl. You will also need to set the MOD_PERL_TRACE environment variable at runtime in order to see the diagnostics.

PERL_DESTRUCT_LEVEL={1,2}

When the Perl interpreter is shutting down during server shutdown, this level enables additional checks to make sure the interpreter has done proper bookkeeping. The default is 0. A value of 1 enables full destruction, and 2 enables full destruction with checks. This value can also be changed at runtime by setting the environment variable PERL_DESTRUCT_LEVEL.

PERL_DEBUG=1

This options builds mod_perl and the Apache server with C source code debugging enabled (the -g switch). It also enables PERL_TRACE, sets PERL_DESTRUCT_LEVEL to 2, and links against the debuggable libperld Perl interpreter if one has been installed. You will be able to debug the Apache executable and each of its modules with a source level debugger, such as the GNU debugger gdb.

B.1.1.2 Options for activating phase callback hooks

The following Makefile.PL options enable handling of the various phases of the Apache request cycle. The significance of these phases is explained in previous chapters. Unless specified otherwise, these options are all disabled by default. Specifying EVERYTHING=1 will enable them en masse.

PERL_DISPATCH=1

Enables the PerlDispatchHandler directive.

PERL_CHILD_INIT=1

Enables the PerlChildInitHandler directive.

PERL_CHILD_EXIT=1

Enables the PerlChildExitHandler directive.

PERL_INIT=1

Enables the PerlInitHandler directive.

PERL_POST_READ_REQUEST=1

Enables the PerlPostReadRequestHandler directive.

PERL_TRANS=1

Enables the PerlTransHandler directive.

PERL_HEADER_PARSER=1

Enables the PerlHeaderParserHandler directive.

PERL_ACCESS=1

Enables the PerlAccessHandler directive.

PERL_AUTHEN=1

Enables the PerlAuthenHandler directive.

PERL_AUTHZ=1

Enables the PerlAuthzHandler directive.

PERL_TYPE=1

Enables the PerlTypeHandler directive.

PERL_FIXUP=1

Enables the PerlFixupHandler directive.

PERL_HANDLER=1

Enables the PerlHandler directive. (This directive is enabled by default.)

PERL_LOG=1

Enables the PerlLogHandler directive.

PERL_CLEANUP=1

Enables the PerlCleanupHandler directive.

B.1.1.3 Options for activating standard API features

These options enable various standard features of the API, which are described in Chapter 9. While not absolutely needed, they're very handy and there's little penalty for including them. Unless specified otherwise, these options are all disabled by default. The EVERYTHING=1 or DYNAMIC=1 options will enable them all.

PERL_FILE_API=1

Enables the Apache::File class.

PERL_TABLE_API=1

Enables the Apache::Table class.

PERL_LOG_API=1

Enables the Apache::Log class.

PERL_URI_API=1

Enables the Apache::URI class.

PERL_UTIL_API=1

Enables the Apache::Util class.

PERL_CONNECTION_API=1

Enables the Apache::Connection class. This class is enabled by default. Set the option to 0 to disable it.

PERL_SERVER_API=1

Enables the Apache::Server class. This class is enabled by default. Set the option to to disable it.

APACHE_HEADER_INSTALL=1

Disables the installation of Apache header files. This option is enabled by default. Set the option to to disable it.

B.1.1.4 Options for activating miscellaneous features

These options enable or disable a variety of features that you may or may not need. They are disabled by default unless EVERYTHING=1 is specified.

PERL_SECTIONS=1

Enables <Perl> configuration sections.

PERL_SSI=1

Enables the perl directive in the mod_include module.

PERL_DIRECTIVE_HANDLERS=1

Enables the Perl configuration directive API, including the Apache::ModuleConfig and Apache::CmdParms classes. This API is described in Chapter 8.

PERL_STACKED_HANDLERS=1

Enables the "Stacked Handlers" feature.

PERL_METHOD_HANDLERS=1

Enables the "Method Handlers" feature.

EVERYTHING=1

This attribute enables all phase callback handlers, all API modules, and all miscellaneous features.

EXPERIMENTAL=1

This attribute enables all "experimental" features, which are usually under development and discussion on the modperl mailing list.

  评论这张
 
阅读(794)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017