perl install

perlのインストールです。
公式がオライリーだとは知りませんでした。

本家

しかし、mod_perlインスコすることにしました。

そうなるとコチラでダウンロードします。
apacheのバージョン気にして下さい。

#
tar xzvf mod_perl-2.0-current.tar.gz

#
cd mod_perl-2.0.3

#
./perl Makefile.PL \
USE_APXS=1 \
WITH_APXS=/usr/local/apache/bin/apxs

#
make

#
make install

以上でDLからINSTALLまで終了です。
続いて、アパッチの編集

httpd.conf

                                                                                          • -

LoadModule perl_module /usr/local/apache/modules/mod_perl.so
~
<Files *.cgi>
SetHandler perl-script
#PerlHandler Apache::Registry
PerlHandler ModPerl::Registry
PerlSendHeader On
Options ExecCGI
Allow from All
</Files>

                                                                                          • -

こんな感じです。
apache1だと「PerlHandler Apache::Registry」
apache2だと「PerlHandler ModPerl::Registry」
らしいです。

vi test.perl.cgi

                                                                                          • -

#! /usr/bin/perl -w
use strict;

print "Content-type: text/html\n\n";
print "<html>\n<head>\n";
print "<title>perl apache</title>\n";
print "</head>\n<body>\n";
print "<h2>start perl !!</h2>";
print "</body>\n</html>";

                                                                                          • -

で、ブラウザで確認。

表示されましたか?
私はこれで表示されました。

参考