nutch和solr集成安装
来源:互联网 发布:一朝成名天下知出处 编辑:程序博客网 时间:2024/05/16 05:07
- 安装的操作系统环境为:redhat6.5server64位系统,下载nutch1.8、solr4.7.0,解压压缩包并配置jdk支持
- 拷贝[solr_home]/dist/apache-solr-4.7.0.war的文件到tomcat/webapps目录下,并且改名solr.war
- 将[solr_home]\example\下的solr目录拷贝到任意位置,我是放在:~/tomcat7/solr下
- 在tomcat目录下的conf\Catalina\localhost目录中(如果没有则手工创建该目录)创建solr.xml文件,文件内容如下:
<Context docBase="[tomat_home]/webapps/solr.war" debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String" value="[tomcat_home]/solr" override="true" />
</Context>
tomcat/webapps/solr/WEB-INF/lib/下。这时可能会有重复的jar包,覆盖下就ok了.
启动tomcat,输入http://localhost:8080/solr/,出现欢迎界面则表示配置成功
6. 将[nutch_home]/conf/schema-solr4.xml复制到/tomcat7/solr/collection1/conf目录下并改名为schema.xml,并在<fields>节点最后
添加<field name="_version_" type="long" indexed="true" stored="true"/>,solr配置完成。
7. 配置nutch爬取网页:
(1)修改文件conf/nutch-site.xml,设置HTTP请求中agent的名字:
<?xml version="1.0"?>
(2)创建种子文件夹 :mkdir -p urls ,创建种子文件/urls/seed.txt,并添加要爬去的URL,如http://localhost:8080/<?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration><property><name> http.agent.name </name><value>Friendly Crawler</value></property></configuration>
(3)配置conf/regex-urlfilter.txt文件,修改
# accept anything else
+.
为:+^http://([a-z0-9]*\.)*localhost:8080/
(4)执行爬取命令:./bin/crawl urls mydir http://localhost:8080/solr/ 2
(5)solr查询:
0 0
- nutch和solr集成安装
- 集成Nutch和Solr
- Nutch和Solr的集成方案
- nutch solr 集成问题
- [Nutch]Apache Solr的安装和配置
- nutch与solr集成备忘录
- 【Nutch】Nutch-2.3 + HBase-0.94.14 + Solr-4.10.4 集成配置与安装
- nutch和solr
- nutch+solr 安装调试 一
- nutch安装,与solr整合
- CentOS nutch solr 集成问题 (二 )
- Nutch 2 + HBase + Solr 4集成
- 【Nutch2.3基础教程】集成Nutch/Hadoop/Hbase/Solr构建搜索引擎:安装及运行【集群环境】
- 【Nutch2.3基础教程】集成Nutch/Hadoop/Hbase/Solr构建搜索引擎:安装及运行【集群环境】
- nutch和solr配置学习
- nutch和solr配置实用
- nutch框架和solr框架
- nutch和solr做爬虫
- 深入浅出学习Struts1框架(一):一个简单mvc模式代码示例开始
- SVN使用简介
- hdu 1069 Monkey and Banana (结构体排序,也属于简单的dp)
- AFNetworking 2.0+ 上传单张/多张图片
- 设计模式-观察者模式
- nutch和solr集成安装
- axure rp
- JSP页面中禁止输出空行
- Java--获取路径 中文问题
- Oracle 存储过程覆盖
- Andriod中的依赖注入
- HDU—— 1867 A + B for you again
- Ubuntu(Linux) + mono + jexus +asp.net MVC3部署
- C# DataSet、DataTable、DataRow、DataColumn 数据集应用大全