install perl 5.18
$ wget http://www.cpan.org/src/5.0/perl-5.18.4.tar.gz $ tar -xvf perl-5.18.4.tar.gz $ cd perl-5.18.4 $ ./Configure -Dusethreads -Accflags="-fPIC" -de $ make $ make test $ su # make install
※「-Dusethreads -Accflags="-fPIC"」option are needed by mod_perl.
install apache2.2
$ wget http://ftp.riken.jp/net/apache//httpd/httpd-2.2.31.tar.gz $ tar -xvf httpd-2.2.31.tar.gz $ cd httpd-2.2.31 $ ./configure --prefix=/home/endo/local/apache22 \ --with-mpm=prefork \ --enable-proxy \ --enable-modules=all \ --enable-so $ make $ make install
install mod_perl
$ wget http://www.apache.org/dyn/closer.cgi/perl/mod_perl-2.0.9.tar.gz $ tar -xvf mod_perl-2.0.9.tar.gz $ cd mod_perl-2.0.9 $ /usr/local/bin/perl Makefile.PL \ USE_APXS=1 \ WITH_APXS=/home/endo/local/apache22/bin/apxs \ EVERYTHING=1 $ make $ make test $ su # make install
edit httpd.conf & startup.pl
$ vi /home/endo/local/apache22/conf/httpd.conf : LoadModule perl_module modules/mod_perl.so PerlRequire /home/endo/local/apache22/conf/startup.pl PerlSetEnv XING_CONF /home/endo/dev/xing/etc/config.yaml <Directory "/home/endo/dev/xing/app"> AllowOverride All Order allow,deny Allow from all AuthType BASIC AuthUserFile /home/endo/dev/htpasswd AuthName "COLINUX MEMBERS" require valid-user <Files "*.pl"> Options ExecCGI AddHandler cgi-script .pl SetHandler perl-script PerlHandler ModPerl::Registry PerlSendHeader On </Files> </Directory> Alias /Xing /home/endo/dev/xing/app
$ vi /home/endo/local/apache22/conf/startup.pl : #/usr/local/bin/perl BEGIN { use lib qw(. /home/endo/dev/xing/lib ); } use NMW::Template; $NMW::Template::ENCODING = 'utf8'; @NMW::Template::template_path=('/home/endo/dev/xing/tmpl'); use CGI; $CGI::LIST_CONTEXT_WARN = 0; #use Devel::Cover; #$DEVEL_COVER_OPTIONS='-dir,/home/endo/tmp'; 1;