nutch安装、配置和使用
来源:互联网 发布:取色软件 编辑:程序博客网 时间:2024/05/24 03:52
安装nutch
1. 下载nutch编译完的安装包,下载地址如下:http://labs.renren.com/apache-mirror//nutch/apache-nutch-1.3-bin.zip 并解压。解压完的目录如下:
[root@mdss33 nutch-1.3]# lsbuild.xml CHANGES.txt conf default.properties docs ivy KEYS lib LICENSE.txt NOTICE.txt README.txt runtime src
2. 修改文件权限
[root@mdss33 nutch-1.3]# cd runtime/local/bin/ conf/ crawl/ lib/ logs/ plugins/ urls/ [root@mdss33 nutch-1.3]# cd runtime/local/[root@mdss33 local]# chmod +x ./bin/nutch
配置运行
3. 修改配置文件vim ./conf/utch-site.xml
<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration><property><name>http.agent.name</name><value>my nutch spider</value></property></configuration>
[root@mdss33 local]# mkdir -p urls
[root@mdss33 local]# vim ./urls/seed内容如下,这里需要注意的是在第二行的末尾需要添加空行:
[root@mdss33 local]# cat ./urls/seed http://nutch.apache.org/http://hbase.apache.org/
# accept anything else+.
替换成:
# accept anything else# +.+^http://([a-z0-9]*\.)*nutch.apache.org/+^http://([a-z0-9]*\.)*hbase.apache.org/
6. 配置工作已经完成,下面开始让spider运行。
bin/nutch crawl urls -dir crawl -depth 3 -topN 5命令解释如下:
-dir dir names the directory to put the crawl in.-threads threads determines the number of threads that will fetch in parallel.-depth depth indicates the link depth from the root page that should be crawled.-topN N determines the maximum number of pages that will be retrieved at each level up to the depth.
7. nutch运行完毕之后,将生成如下的目录:
crawl/crawldbCrawl/linkdbcrawl/segments
- nutch安装、配置和使用
- 【Nutch】Linux下Nutch分布式配置和使用
- nutch-1.2和nutch-1.3的配置使用
- nutch-1.2和nutch-1.3的配置使用
- [Nutch]Apache Solr的安装和配置
- Linux下Nutch分布式配置和使用
- Linux下Nutch分布式配置和使用
- Linux下Nutch分布式配置和使用
- Linux 下 Nutch的安装和使用
- nutch安装及配置
- Nutch 安装使用笔记
- Nutch的安装使用
- ubuntu下nutch-1.0的安装和配置错误排除
- ubuntu下nutch-1.0的安装和配置错误排除
- nutch 1.4成功在windows的配置和使用
- Nutch的安装与配置
- nutch 1.6 安装与配置
- nutch和solr配置学习
- xwork 各版本下载地址
- java 泛型
- 网络编程常见问题总结
- Http与Socket连接区别
- 关于boost的regex库和xpressive库匹配所有标点(含中文标点)的方法
- nutch安装、配置和使用
- MigBot代码补丁技术的源代码过程讲解
- 彻底解决COM端口被占用(在使用中)问题的办法
- PictureEdit 使用
- 将DIB转换为IplImage(核心代码)
- 膜拜吧,令人惊奇的HTML5和JavaScript效果
- 不可能解开的谜题 (程序员修炼之道,评注者序)
- struts2输入校验
- Crontab运行php脚本