安裝藍點linux2.0, 所有軟件全部安裝。
啟動服務去掉httpd (我從apache.org下載源代碼,將重新編譯安裝)
安裝完reboot先。
啟動登錄之后
mkdir dos
mount /dev/hda1 /dos (我把下載的apache源代碼和mod_perl源代碼放在c盤dos分區了)
mkdir /usr/flybird
cd /dos
cp * /usr/flybird
tar -zxvf apache_1.3.12.tar.gz
cd apache_1.3.12
./configure (編譯安裝apache)
make
make install
cd /usr/local/apache/bin
sh apachectl start
按ctrl-alt-f7 回到kde界面.netscape可以瀏覽 http://localhost/ 看到一個apache的畫面說it worked
按ctrl-alt-f1 回到命令行
sh apachectl stop
cd /usr/flybird
tar -zxvf mod_perl-1.24.tar.gz
cd mod_perl-1.24
vi INSTALL (看看安裝幫助先)
perl Makefile.PL (編譯安裝mod_perl)
有提示,按y,回車,
又有提示,又按y,又回車。
make
make test
make install
cd /usr/local/apache/conf
vi httpd.conf
找到 #AddHandler cgi-script .cgi
修改為 AddHandler cgi-script .cgi .pl
cd /usr/local/apache/cgi-bin
vi test.pl
輸入程序
#!/usr/bin/perl
use CGI;
print "content-type:text/html\n\n";
print "hello"
保存,退出vi
chmod 755 *
cd /usr/local/apache/bin
sh apachectl start
回到KDE界面用netscape 瀏覽http://localhost/cgi-bin/test.pl
它顯示頁面 hello
chat * cry
飛鳥抱著顯示器放聲痛哭。
終于配置成功了!
note:www.apache.org 可以下載apache源代碼和mod_perl源代碼