[solr]solr的安装
solr是什么?
翻译:
SolrTM is the popular, blazing fast open source enterprise search platform from the Apache LuceneTM project. Its major features include powerful full-text search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites.
Solr is written in Java and runs as a standalone full-text search server within a servlet container such as Jetty. Solr uses the Lucene Java search library at its core for full-text indexing and search, and has REST-like HTTP/XML and JSON APIs that make it easy to use from virtually any programming language. Solr's powerful external configuration allows it to be tailored to almost any type of application without Java coding, and it has an extensive plugin architecture when more advanced customization is required.
See the complete feature list for more details.
solr安装
下载:
http://archive.apache.org/dist/lucene/solr/
最新版本4.6.1
环境需求:
java 1.6版本以上;
solr运行需要java serverlet 容器,默认使用jetty,或者tomcat,jboss等等。
步骤:
1.wget 软件包,wget http://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz
2.解压, tar zxvf solr-4.6.1.tgz
3.进入到solr-4.6.1/example, 运行java -jar start.jar,这样jetty就监听在8983端口,在浏览器输入ip:8983/solr
side XXXXXXXXX
使用tomcat替代jetty
1.安装好java,安装好tomcat
2.将解压包中的solr-4.6.1/dist/solr-4.6.1.war复制到tomcat_dir/webapps/目录,并命名为solr.war
3.将solr-4.6.1/example/lib/ext/目录下的jar文件复制到tomcat_dir/lib目录下,将solr-4.6.1/example/resources/下的log4j.properties文件复制到tomcat_dir/lib目录下
这一步的目的是解决报错 startInternal SEVERE: Error filterStart,参考http://www.cnblogs.com/hupengcool/archive/2013/05/11/3072573.html
4.修改tomcat_dir/conf/server.xml
<Connector port="" protocol="HTTP/1.1"
connectionTimeout=""
redirectPort=""
URIEncoding="UTF-8" />
5.创建solr.xml,路径:tomcat_dir/conf/Catalina/localhost/solr.xml,内容:
<Context path="/solr" docBase="/home/app/act/tomcat/apache-tomcat-7.0.47/webapps/solr.war"
debug="" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/home/app/act/solr/example/solr/" override="true" />
</Context>
6.下面是添加solr配置文件,这些文件包括schema.xml,solrconfig.xml等等,这些文件放置在solr/home目录下(实际上实在solr/home/collection1下)。
solr-4.6.1/example/solr/下的目录结构是
.
├── bin
├── collection1
│ ├── conf
│ │ ├── admin-extra.html
│ │ ├── admin-extra.menu-bottom.html
│ │ ├── admin-extra.menu-top.html
│ │ ├── clustering
│ │ │ └── carrot2
│ │ │ ├── kmeans-attributes.xml
│ │ │ ├── lingo-attributes.xml
│ │ │ └── stc-attributes.xml
│ │ ├── currency.xml
│ │ ├── elevate.xml
│ │ ├── lang
│ │ │ ├── contractions_ca.txt
│ │ │ ├── contractions_fr.txt
│ │ │ ├── contractions_ga.txt
│ │ │ ├── stopwords_ca.txt
│ │ │ ├── stopwords_cz.txt
│ │ │ ├── stopwords_da.txt
│ │ ├── mapping-FoldToASCII.txt
│ │ ├── mapping-ISOLatin1Accent.txt
│ │ ├── protwords.txt
│ │ ├── schema.xml
│ │ ├── scripts.conf
│ │ ├── solrconfig.xml
│ │ ├── spellings.txt
│ │ ├── stopwords.txt
│ │ ├── synonyms.txt
│ │ ├── update-script.js
│ │ ├── velocity
│ │ │ ├── browse.vm
│ │ │ ├── cluster_results.vm
│ │ │ ├── cluster.vm
│ │ │ ├── debug.vm
│ │ │ └── VM_global_library.vm
│ │ └── xslt
│ │ ├── example_atom.xsl
│ │ ├── example_rss.xsl
│ │ ├── example.xsl
│ │ ├── luke.xsl
│ │ └── updateXml.xsl
│ ├── core.properties
│ ├── data
│ │ ├── index
│ │ │ ├── _0.fdt
│ │ │ ├── _0.fdx
│ │ │ ├── _0.fnm
│ │ │ ├── _0_Lucene41_0.doc
│ │ │ ├── _0_Lucene41_0.pos
│ │ └── tlog
│ │ └── tlog.
│ └── README.txt
├── README.txt
├── solr.xml
└── zoo.cfg
按照上面可以运行solr。
最新文章
- .net学习笔记---tcp/udp/http/socket
- [Linux] 学习笔记之安装学习环境(sshd, lrzsz)
- Scrapy
- UML中类之间的几种关系
- 【阿里云产品公测】Opensearch使用体验和评测
- Android:Resources资源文件
- trigger
- MVC-各种传值方式
- LinGo:投资问题——线性规划
- 使用Canvas实现下雪功能
- Knockout应用开发指南 第十章:更多信息(完结篇)
- Bootstrap-table事件使用
- 《共享库PATH与ld.so.conf简析》
- IntelliJ IDEA 导入新项目
- 使用commit方式构建具有sshd服务的centos镜像
- 设计模式(三)Singleton Pattern单例设计模式
- ie67的冷知识
- BlockingQueue之DelayQueue的学习使用
- Python的生成器进阶玩法
- python(57):私有变量,代码块