windows上搭建自己的搜索引擎nutch

原创 2007年09月27日 23:05:00

nutch windows install guider

--By Liming Liu

 

1 Install Cygwin. 1

2 Install JDK.. 4

3 Install Tomcat 5

4 Pre-Install nutch. 5

5 Configure and run nutch. 5

6 Begin search. 7

7 Referece. 7

 

1 Install Cygwin

Download and install the latest version, must select GCC while selecting packages.
 
   

2 Install JDK

Download jdk-1_5_0_06-windows-i586-p.exe and install(acquiescently, C:/Program Files/Java/jdk1.5.0_06 ).

 

Set environmental variable: NUTCH_JAVA_HOME: C:/Program Files/Java/jdk1.5.0_06

JAVA_HOME: C:/Program Files/Java/jdk1.5.0_06

 

3 Install Tomcat

Download apache-tomcat-6.0.13.exe and install(acquiescently, C:/Program Files/Apache Software Foundation/Tomcat 6.0).Remember the port, account and password.

 

4 Pre-Install nutch

Download nutch-0.9.tar.gz and unzip to nutch-0.9(such as C:/dev/search/netch/nutch-0.9).

 

Start Tomcat service, open http://localhost:8080/manager/html

 

Move to “WAR file to deploy”, upload file: C:/dev/search/netch/nutch-0.9/nutch-0.9.war.

 

Close Tomcat service, change directory name “ROOT” in “C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps” to “ ROOT-backup”, change directory name “nutch-0.9” in “C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps” to “ ROOT”.( OR do nothing)

 

5 Configure and run nutch

Create directory “urls” in “C:/dev/search/netch/nutch-0.9”.

Create a file “testurlfile” in directory “urls”.

Add line: “http://www.bokee.com “ to  file “testurlfile”.

Find file “C:/dev/search/netch/nutch-0.9/conf/ crawl-urlfilter.txt”, replace “MY.DOMAIN.NAME” with “bokee.com”

 

 

Find file “C:/dev/search/netch/nutch-0.9/conf/ nutch-site.xml”, edit it to this:

<?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>nutch</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>liming agent.description</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></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>agent.email</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>

 

 

Find file “C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/ROOT/WEB-INF/classes/”, edit it to this:

<?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>C:/dev/search/netch/nutch-0.9/crawl.demo</value>

</property>

</configuration>

 

Find file C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/server.xml.Edit the item <Connector port="8080" …/>” to this:

<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100"   debug="0" connectionTimeout="20000"  disableUploadTimeout="true" URIEncoding="UTF-8"/>

 

Start tomcat service.

 

Start cygwin, cd to “C:/dev/search/netch/nutch-0.9”, run: bin/nutch crawl urls -dir crawl.demo -depth 2 -topN 50  

 

6 Begin search

Open http://localhost:8080 with internet explorer, you will see a real search engine.

(Or http://localhost:8080/nutch)

                  

7 Referece

http://www.javaeye.com/topic/81627  Nutch_0.8实践 (1)  X.D.Hua

http://www.ideagrace.com/club/simple/index.php?t312.html Nutch winxp Kevin

http://blog.csdn.net/pwlazy/archive/2006/08/23/1109868.aspx windowsnutch0.8初探 pwlazy

 

 

Liming Liu:

刘黎明 北京科技大学计算机硕士 liuliming2008@126.com

 

相关文章推荐

白盒测试的逻辑覆盖测试总结

procedure example(y,z:real; var x:real) begin if(y > 1) and (z = 0)
  • scau_cr
  • scau_cr
  • 2014年04月26日 09:57
  • 1783

爬虫抓取网易云音乐民谣歌单,收听量排行

今天花了一点时间抓取了网易云音乐的热门民谣歌单,共1500热门民谣歌单,后续有时间会爬取其他分类。文末有源代码下载。下面记录一下过程。...

windows XP下nutch-1.0搜索引擎环境搭建

“开始先吐槽一下,弄了几天,终于在昨天找出错误原因了,写下博文记录之。”     由于工程实践选题是关于搜索引擎的,先用nutch搭建个搜索引擎玩一玩,没想到一玩就是好几天,归正题。 1.下载JD...
  • ustcqi
  • ustcqi
  • 2012年10月13日 10:54
  • 466

信息检索大作业:在Windows XP上搭建 nutch-0.9 搜索引擎环境

零、软件资源 1 cygwin 2 jdk1.6.0_10 3 nutch-0.9 4 Tomcat 自行寻找下载 http://download.csdn.net/detail/...

Windows下开源搜索引擎Nutch1.2的安装

Nutch是Apache组织的一个开源项目,利用它用户可以建立自己内部网的搜索引擎,也可以建立针对整个网络的搜索引擎。    两年前Nutch0.9版本的时候我写了个针对Linux的安装介绍,最近nu...
  • sunleap
  • sunleap
  • 2011年02月08日 22:51
  • 1282

Nutch+MongoDB+ElasticSearch+Kibana 搭建搜索引擎

前言: 文章讲述如何通过Nutch、MongoDB、ElasticSearch、Kibana搭建网络爬虫,其中Nutch用于网页数据爬取,MongoDB用于存储爬虫而来的数据,ElasticSea...

利用nutch、hbase和solr搭建搜索引擎

我感觉搜索引擎是互联网界最伟大的技术,它让我们在网上查询变得异常方便。         公司近期需要搭建一个站内搜索引擎,用来方便客户查询数据。借此机会学习下搜索引擎的搭建和原理。 开源界最完善的开源...

Nutch + Solr + Hadoop 搭建分布式搜索引擎详细教程

Nutch + Solr + Hadoop 搭建分布式搜索引擎详细文档 经过几天的摸索,终于完全成功地把环境搭建好了,这个过程遇到各种问题,并且目前网上没有一个完全可行的详细环境搭建教程,所以这里专门...

Linux上 Nutch 1.3 + Solr 3.4.0 + Tomcat6.0 搜索引擎单节点搭建笔记

Linux上 Nutch 1.3 + Solr 3.4.0 + Tomcat6.0 搜索引擎单节点搭建笔记            Nutch 是apache下的一款开源web搜索引擎,而Solr...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:windows上搭建自己的搜索引擎nutch
举报原因:
原因补充:

(最多只允许输入30个字)