尚未实证:因为摸索CGI程序部署而有了这个笔记,但是并未使用,参考:https://amon.org/perl
官网:http://perl.apache.org/
下载:http://perl.apache.org/download/index
参考:http://perl.apache.org/docs/2.0/user/install/install
参考:https://zhidao.baidu.com/question/10585770
wget http://www.apache.org/dyn/closer.cgi/perl/mod_perl-2.0.10.tar.gz tar -zxvf mod_perl-2.0.10.tar.gz && cd mod_perl-2.0.10 perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 USE_APACI=1 USE_DSO=1 USE_APXS=1 WITH_APXS=/usr/local/apache2/bin/apxs make && make install
它会自动修改httpd.conf,加入LoadModule和AddModule语句。
修改配置文件,将用perl写的cgi程序改用mod_perl驱动:
原来的配置:
ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
改为:
Alias /cgi-bin/ /usr/local/apache/cgi-bin/
PerlModule Apache::Registry
<Location /cgi-bin>
      SetHandler perl-script
      PerlHandler Apache::Registry
      Options ExecCGI
      allow from all
      PerlSendHeader On
</Location>
重新启动apache
/usr/local/apache2/bin/apachectl restart