现在的位置: 首页 > 综合 > 正文

TSE平台搭建(ubuntu10.10,VBOX)

2013年04月23日 ⁄ 综合 ⁄ 共 1535字 ⁄ 字号 评论关闭

 

 

准备工作:先参看此帖“TSE相关资料收集”http://blog.csdn.net/leonsc/archive/2011/05/14/6420520.aspx

下载最新TSE代码,主要为index和tse,其中index是web示范程序,tse为爬取模块。

详细阅读tse_tutorial文档。文中修改httpd部分详见下文。

 

1、先安装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

2、根据tse_tutorial中所述的操作

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

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

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


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

它的配置文件是存放在 etc/apache2/ 这个文件夹下面,又将以前的配置文件分成了几个
分别是:
etc/apache2/conf.d/charset 
最后添加一行:AddDefaultCharset GB2312

etc/apache2/sites-available/default 

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

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

~$ cd /etc/apache2/sites-available

~$ sudo cp default default_backup

~$ sudo gedit 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/">

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

4、重启apache2

sudo /etc/init.d/apache2 restart
打开浏览器,输入“http://localhost"
就出现了北大天网的搜索页面,测试可用!

 

参考文献:http://apps.hi.baidu.com/share/detail/2183094

 

 

抱歉!评论已关闭.