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

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

 
软件介绍: 横瓜全文搜索引擎,是基于Windows平台的全文搜索引擎(不提供网络蜘蛛),最大容量150万网页。 对于150万网页规模的数据,可在30分钟内完成所有架构工作。横瓜全文搜索引擎分词速度约为 2500万字/分钟,约占99.984%的关键词检索时间小于0.001秒。横瓜全文搜索引擎的PC硬件配置, 仅需要700M内存、空闲硬盘10G、文件系统NTFS。横瓜全文搜索引擎采用横瓜分布式Map数据库技 术、分词索引技术、最大左匹配切词技术、倒排技术、MD5摘要信息抽取技术、新词智能识别技术、 硬盘整理加速技术、疑似垂直搜索技术、中文海量词典技术、横瓜HTTP检索服务器web-search缓存 技术、HTM转换TXT技术等。 搜索引擎开发及合作,请联系QQ(601069289) 安装说明: 1、第一次使用软件前,先执行Setup.exe。程序add.exe、body.exe、title.exe为系统内核,勿动! 2、架构搜索步骤:须依次单击websearch.exe程序中的按钮"数据清零"、"导入记录"、"标题分词"、 "正文分词"、"WWW查询"。 3、数据清零。建立新的搜索之前,须单击"数据清零"按钮来清除旧数据和旧索引。 4、websearch.exe可管理记录、索引、分词等,若要执行HTTP检索查询服务,websearch.exe须挂机。 5、数据导入。在web目录下,有Access格式的输入接口文件web.mdb(字段id取值越小排名越靠前)。 将待处理数据输入到web.mdb后,单击“导入记录”按钮,web.mdb中的记录被导入到web.dat。在检 索时直接从web.dat取记录,web.mdb仅起接口作用,导入完成后可自愿删留。对于增量记录,可允许 从web.mdb中多次导入新记录,但新增量的记录,检索排名靠后,增量导入后,须再依次单击按钮 "标题分词"、"正文分词"后,才能被检索到。 6、websearch.exe挂机后,从IE中输入"http://IP地址或域名:7777/"可检索查询。在www目录下, 存有搜索引擎的主页和LOGO,客户可以根据个性需要自行修改。 7、使用本软件,必须开放端口:7000、7001、70002、70003、70004、7777、7778 8、本软件使用的基础词典已经用MD5加密封装,用户可以在dic.txt中自由添加新词,新词被添加到 dic.txt后,被检索的几率变大。若不添加新词,也可以被检索到,只是几率稍小些。 9、web目录中web.mdb的记录是赠送测试用的,可以将待处理数据输入“模板web.mdb”替换该文件。 10、不得将本软件用于赢利目的、销售他人、非法用途等,否则将会被追究法律责任。 搜索引擎开发及合作,请联系QQ(601069289)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值