以非超级用户身份安装 mod_perl(8) 3)构建和安装 nbsp;mod_perl 4)安装 nbsp;mod_perl nbsp;之后恢复它 这是相当麻烦的任务,但是我相信 nbsp;CPAN.pm nbsp;最终会被改善,处理起来更容易。 所以你还是跟我一起,那么就像通常一样启动 nbsp;Shell: nbsp; % nbsp;perl nbsp;-MCPAN nbsp;-eshell 第一,读取 nbsp;makepl_arg nbsp;的值: nbsp; cpan> nbsp;o nbsp;conf nbsp;makepl_arg PREFIX=/home/stas 如果你配置CPAN.pm来本地化安装模块,那就会是象 nbsp;PREFIX=/home/stas nbsp;这样的字符串。保存这个值: nbsp; cpan> nbsp;o nbsp;conf nbsp;makepl_arg.save nbsp;PREFIX=/home/stas 第二,设置一个新值, nbsp;mod_perl nbsp;安装进程会用到它。(你可以根据你的需要加入参数到这行或者删除) nbsp; cpan> nbsp;o nbsp;conf nbsp;makepl_arg nbsp;‘DO_HTTPD=1 nbsp;USE_APACI=1 nbsp;EVERYTHING=1 nbsp; PREFIX=/home/stas nbsp;APACHE_PREFIX=/home/stas/apache’ 第三, nbsp;让 nbsp;为你构建和安装 nbsp;mod_perl: nbsp; cpan> nbsp;install nbsp;mod_perl 第四, nbsp;复位makepl_arg到原始值.我们可以通过打印这些保存的变量值然后分配给 nbsp;makepl_arg来实现. nbsp; cpan> nbsp;o nbsp;conf nbsp;makepl_arg.save PREFIX=/home/stas cpan> nbsp;o nbsp;conf nbsp;makepl_arg nbsp;PREFIX=/home/stas 不是很简明,但却是一个有效方法。你可以在一张纸条上写下这个值,而不是保存在 nbsp;makepl_arg.save, nbsp;但是这样你更可能犯错误。 nbsp;参考 Apache nbsp;网站网址: nbsp;http://www.apache.org mod_perl nbsp;网站网址: nbsp;http://perl.apache.org nbsp; CPAN nbsp;是 nbsp;Perl nbsp;综合典藏网的缩写(Comprehensive nbsp;Perl nbsp;Archive nbsp;Network). nbsp;主站网址是http://cpan.org/. nbsp; 世界范围内,CPAN nbsp;的镜像站点有 nbsp;100 nbsp;多个。(http://cpan.org/SITES.html)