mod_perl 模块:
wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
tar -zxvf mod_perl-2.0-current.tar.gz
cd mod_perl-2.0.3
perl Makefile.PL MP_APXS=/usr/local/apache/bin/apxs
make && make test
make install
apache自动重启模块:
wget http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/Apache-Reload-0.07.tar.gz
tar -zxvf Apache-Reload-0.07.tar.gz
cd Apache-Reload-0.07
perl Makefile.PL
make install
vi /usr/local/apache/conf/httpd.conf
LoadModule perl_module modules/mod_perl.so
测试:
1、mkdir -p /usr/local/apache/perl/modules/Apache
vi Hello.pm
2、vi /www/Mycgi/cgi-bin/index.cgi
use lib qw(/usr/local/apache/perl/modules);
1;
3、vi /usr/local/apache/conf/httpd.conf
3、重启apache
/usr/local/apache/bin/apachectl restart
4、http://cgi.sina.com/hellow
Hello, world! This is an Apache Handler.
引用
wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
tar -zxvf mod_perl-2.0-current.tar.gz
cd mod_perl-2.0.3
perl Makefile.PL MP_APXS=/usr/local/apache/bin/apxs
make && make test
make install
apache自动重启模块:
wget http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/Apache-Reload-0.07.tar.gz
tar -zxvf Apache-Reload-0.07.tar.gz
cd Apache-Reload-0.07
perl Makefile.PL
make install
vi /usr/local/apache/conf/httpd.conf
LoadModule perl_module modules/mod_perl.so
1、mkdir -p /usr/local/apache/perl/modules/Apache
vi Hello.pm
2、vi /www/Mycgi/cgi-bin/index.cgi
use lib qw(/usr/local/apache/perl/modules);
1;
3、vi /usr/local/apache/conf/httpd.conf
3、重启apache
/usr/local/apache/bin/apachectl restart
4、http://cgi.sina.com/hellow
Hello, world! This is an Apache Handler.