(转)Tiny Search Engine 环境的搭建

在Ubuntu

下面有些配置需要设置

现在安装Apache2 服务器

sudo apt-get install apache2
打开,关闭,重起Apache2的命令:
打开:sudo /etc/init.d/apache2 start
关闭:sudo /etc/init.d/apache2 stop
重起:sudo /etc/init.d/apache2 restart

根据tse_tutorial中所述的操作
把index包解压完;

“把linux/var/www/html 中的内容移出,并将make后的文件放到 /var/www/html/yc-cgi-bin/index

tarindex/public_html中的所有文件移到/var/www/html

建立/var/www/html/yc/TSE,并把index/public_html中的文件发到其中”


因为在ubuntu8。10 中安装Apache2和RedHat 的默认路径不同,所以下面需要更改

它的配置文件是存放在 etc/apache2/ 这个文件夹下面,又将以前的配置文件分成了几个
分别是:
etc/apache2/conf.d/charset
这个是网站编码配置,里面内容很少,打开看就知道了,我这里将最后行的 #AddDefaultCharset UTF-8 前面的#去掉,使用UTF-8编码,当然也可以把 UTF-8改成别的编码.

etc/apache2/sites-available/default

这个是网站目录配置,想更改网站目录的话,就修改这个,上面的目录的 apache2.conf 里面也有网站目录的,但不知道为什么,改了没有效果

所需要改的就是etc/apache2/sites-available/default

~$ sudo gedit /etc/apache2/sites-available/default
打开后做如下更改:
DocumentRoot /var/www/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
改为

DocumentRoot /var/www/html/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/html/>


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
改为:
ScriptAlias /yc-cgi-bin/index/ /var/www/html/yc-cgi-bin/index/
    <Directory "/var/www/html/yc-cgi-bin/index/">

这样修改就不需要在程序中再改路径了,其实这些都是可以不改,仅在程序中更改。

重起Apache2
打开浏览器,输入“http://localhost"
就出现了北大天网的搜索页面
至此程序可以完整运行!!!!!!!

下面的工作就是看懂代码啦!!!

哈哈                                                                   
                                                                                -------感谢 闫宏飞老师的帮助
                                                                                -------感谢jrckkyy的帮助
                                                                                -------感谢 http://forum.ubuntu.org.cn/
                                                                                -------代码来源:
http://net.pku.edu.cn/~webg/src/TSE/index.090422-2245.Linux.tar.gz

posted on 2011-10-25 14:20  烟雨飘零  阅读(326)  评论(0编辑  收藏  举报

导航