nutch搜索引擎的搭建
来源:互联网 发布:肖秀荣考点预测知乎 编辑:程序博客网 时间:2024/03/29 09:05
软件先安装好,NUTCH_JAVA_HOME是你java的安装路径设置好
然后开始动手。
在nutch目录下放个urls.txt存放你要扒取的网页
crawl-urlfilter.txt我修改如下:
# accept hosts in MY.DOMAIN.NAME
+^http://([a-z0-9]*/.)*
nutch-site.xml修改如下
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>http.agent.name</name>
<value>Jennifer</value>
<description>HTTP 'User-Agent' request header. MUST NOT be empty -
please set this to a single word uniquely related to your organization.
NOTE: You should also check other related properties:
http.robots.agents
http.agent.description
http.agent.url
http.agent.email
http.agent.version
and set their values appropriately.
</description>
</property>
<property>
<name>http.agent.description</name>
<value>Jennifer</value>
<description>Further description of our bot- this text is used in
the User-Agent header. It appears in parenthesis after the agent name.
</description>
</property>
<property>
<name>http.agent.url</name>
<value>Jennifer</value>
<description>A URL to advertise in the User-Agent header. This will
appear in parenthesis after the agent name. Custom dictates that this
should be a URL of a page explaining the purpose and behavior of this
crawler.
</description>
</property>
<property>
<name>http.agent.email</name>
<value>Jennifer</value>
<description>An email address to advertise in the HTTP 'From' request
header and User-Agent header. A good practice is to mangle this
address (e.g. 'info at example dot com') to avoid spamming.
</description>
</property>
</configuration>
cygwin下输入:bin/nutch crawl urls.txt -dir /myDir 3 >& crawl.log
这样就会生成与nutch目录平行的myDir目录 里面是扒取的结果。crawl.log使用nutch根目录下的日志文件
然后将nutch根目录下的nutch.rar部署的tomcat上,
在部署的文件里WEB-INF/classes下的nutch-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>searcher.dir</name>
<value>E:/myDir</value>
</property>
</configuration>
KO 开始享受吧~~~
- nutch搜索引擎的搭建
- 搭建基于nutch的搜索引擎
- windows上搭建自己的搜索引擎nutch
- nutch搜索引擎的搭建以及配置
- 从零开始搭建nutch搜索引擎
- 使用nutch搭建类似百度/谷歌的搜索引擎
- Linux下用nutch搭建搜索引擎
- 利用nutch、hbase和solr搭建搜索引擎
- Nutch+MongoDB+ElasticSearch+Kibana 搭建搜索引擎
- Nutch+MongoDB+ElasticSearch+Kibana 搭建搜索引擎
- Nutch 的集群式搜索引擎
- 搜索引擎 Nutch
- 基于Java的搜索引擎Nutch中文搜索技术研究
- 开发基于 Nutch 的集群式搜索引擎
- 基于Java的搜索引擎Nutch中文搜索技术
- 基于Java的搜索引擎Nutch中文搜索技术研究
- 架设自己的搜索引擎,Nutch安装手记
- 开发基于 Nutch 的集群式搜索引擎
- 谈谈怎么最快学好android
- 通过Last-Modified,Etag利用客户端缓存对网站进行优化?
- 301、404、200、304等HTTP状态
- Java学习之路:不走弯路,就是捷径
- 在eclipse中调试j2me程序出现ALERT: Attempting to resume current thread的问题
- nutch搜索引擎的搭建
- Linux下配置JAVA环境
- Eclipse搭建ExtJs的开发环境
- 如何远程登陆Linux 下的MYSQL
- 如何设置Linux MySQL数据库 root用户的密码
- Linux下安装Tomcat
- KS线切割编程破解版(无功能限制)
- 重拾C++指针(入门)
- 使用 tar 打包工具