你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu 11.10下Nutch1.4安装及测试

[日期:2012-06-22] 来源:Linux社区  作者:lidexin2003 [字体:大 中 小]

八 编辑regex-urlfilter.txt文件

进入到/apache-nutch-1.4-bin/runtime/local/conf目录下,修改regex-urlfilter.txtl文件,在“# accept anything else”下面输入:“+^http://([a-z0-9*\.])*mittrchinese.com/”,然后保存,见下图

Ubuntu 11.10下Nutch1.4安装及测试

九 开始爬了

命令:nutch crawl urls –dir crawl –depth 3 –topN 5

此命令的意思:“We are using the nutch crawlcommand. The urlsdir is the urls directory that we added to the distributedfilesystem. (I've called it "urlsdir" to make it clearer that itisn't merely the *file* containing urls). The "-dir crawl" is theoutput directory. This will also go to the distributed filesystem. The depth is3 meaning it will only get 3 page links deep. There are other options you canspecify, see the command documentation for those options.”

问题二:出现错误提示,见下图

Ubuntu 11.10下Nutch1.4安装及测试

解决方法如下:

回到/apache-nutch-1.4-bin/runtime/local目录下,执行“chmod +x urls”命令,回车。

(注意此问题不一定会出现,我在Ubuntu10.04上安装Nutch时就没出现过)

Ubuntu 11.10下Nutch1.4安装及测试

重新输入命令:nutch crawl urls –dir crawl –depth 3 –topN 5

屏幕显示如下:

Ubuntu 11.10下Nutch1.4安装及测试

linux
相关资讯       Nutch 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款