?? ch11_02.htm
字號:
<html><head><title>Installing mod_perl (Perl in a Nutshell, 2nd Edition)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Stephen Spainhour" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly & Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="0596002416L" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="Perl in a Nutshell, 2nd Edition" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Java and XSLT" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch11_01.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="ch11_03.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h2 class="sect1">11.2. Installing mod_perl</h2><p><a name="INDEX-1718" /><a name="INDEX-1719" />If youalready have Apache installed on your machine, you will have torebuild it with <em class="emphasis">mod_perl</em>. If you prefer, you caninstall the <em class="emphasis">mod_perl</em>-enabled Apache installationsomewhere else, which we'll also detail in thissection. You can get the source for both Apache and<em class="emphasis">mod_perl</em> from <a href="http://www.apache.org/dist/httpd/">http://www.apache.org/dist/httpd/</a>. You canget <em class="emphasis">mod_perl</em> alone from CPAN or from <a href="http://perl.apache.org/dist/">http://perl.apache.org/dist/</a>. The<em class="emphasis">mod_perl</em> build process is quite configurable,and after you've met some Perl module dependencies,you should be well on your way to building and getting your<em class="emphasis">mod_perl</em>-enabled Apache installation online.</p><p>First, you should take a look at your existing Apache installation(or installations) and make sure that you don'tunintentionally interfere with a working Apache installation. Ifyou're running Apache-1.3.X, it'slikely that your Apache installation lives under<em class="emphasis">/usr/local/apache</em>, or<em class="emphasis">C:\apache</em> if you're on a Win32platform. Second, make sure that you're running acurrent version of Perl and that you've installedthe LWP Bundle of modules. If you haven't installedthe LWP modules bundle, <em class="emphasis">mod_perl</em> might not buildcorrectly and will not run its tests correctly.</p><p>Once you've met the requirements listed above, youshould unpack the Apache and <em class="emphasis">mod_perl</em>distributions and run:</p><blockquote><pre class="code"> % perl Makefile.PL EVERYTHING=1 APACHE_PREFIX=[<em class="replaceable"><tt>target directory</tt></em>]</pre></blockquote><p>Next, run <i class="command">make</i>, <i class="command">make test</i>, andassuming all goes well, <i class="command">make install</i> to installthe <em class="emphasis">mod_perl</em>-enabled Apache:</p><blockquote><pre class="code"> % make % make test % make install</pre></blockquote><p>The <tt class="literal">EVERYTHING=1</tt> option says to build<em class="emphasis">mod_perl</em> with all of the supported features. Ifthis isn't what you were looking for or ifyou'd like to learn more about making a customApache build with <em class="emphasis">mod_perl</em>, you should read the<em class="emphasis">INSTALL</em> file that ships with<em class="emphasis">mod_perl</em>.</p><p>At the time of this writing, both Apache and<em class="emphasis">mod_perl</em> have been ported to Win32. However, youmight have the best results with <em class="emphasis">mod_perl</em> underWin32 if you run ActiveState's Perl distribution andits precompiled version of <em class="emphasis">mod_perl</em>. For furtherinformation about building <em class="emphasis">mod_perl</em> under Win32,see <em class="emphasis">INSTALL.win32</em>.</p><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch11_01.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="ch11_03.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">11. Web Server Programmingwith mod_perl</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">11.3. mod_perl Handlers</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright © 2002</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,85,94" href="../index.htm"><area shape="rect" coords="86,1,178,103" href="../lwp/index.htm"><area shape="rect" coords="180,0,265,103" href="../lperl/index.htm"><area shape="rect" coords="267,0,353,105" href="../perlnut/index.htm"><area shape="rect" coords="354,1,446,115" href="../prog/index.htm"><area shape="rect" coords="448,0,526,132" href="../tk/index.htm"><area shape="rect" coords="528,1,615,119" href="../cookbook/index.htm"><area shape="rect" coords="617,0,690,135" href="../pxml/index.htm"></map></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -