apache2+mod_perl安装指南 不指定

root , 2007/08/21 23:07 , Perl , 评论(0) , 阅读(10920) , Via 本站原创 | |
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.
Tags:
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]