1. chose the release you want: http://archive.apache.org/dist/lucene/solr/.

1) copy [solr_home]/dist/apache-solr-3.6.0.war to tomcat/webapps, and modify the file name to "solr.war".

2) copy the fils under [solr_home]\example\solr to [tomcat_home]/.

3) create solr.xml (if not exists) if conf/Catalina/localhost under tomcat dir. The content following:

  <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>

4)modify server.xml of tomcat, and find the item <Connector port="8080" (surpposing tomcat listens 8080 port). Then add the encoding. At last, it will be:

  <Connector port="8080" URIEncoding="UTF-8"

5) start tomcat, put in http://localhost:8080/solr/. Wolcoming page will show.

2. Deploy IKAnaliser:

1) Download "IK Analyzer 2012FF_hf1.zip": http://code.google.com/p/ik-analyzer/downloads/list.

2) Unzip "IK Analyzer 2012FF_hf1.zip". Then copy "IKAnalyzer2012FF_u1.jar" to [tomcat_home]/webapps/solr/WEB-INF/lib where solr.war is deployed.

3) Create file "classes" under [tomcat_home]/webapps/solr/WEB-INF, Copy IKAnalyzer.cfg.xml and stopword.dic into classes.

4) Deploy [tomcat_home]/solr/conf/schema.xml:

<!-- IKAnalyzer-->
  <fieldType name="text" class="solr.TextField">
  <analyzer class="org.wltea.analyzer.lucene.IKAnalyzer">
  </analyzer>
</fieldType>

3. Just start solr:

Blog [3] show the steps. But one thing which it doesn't discribe is that youo should copy solr.war into /example/webapp.

Reference:

[1] http://blog.csdn.net/witsmakemen/article/details/8256369

[2] http://sbp810050504.blog.51cto.com/2799422/1179312

[3] http://www.importnew.com/12607.html

Install Solr+tomcat的更多相关文章

  1. [Linux] linux下安装配置 zookeeper/redis/solr/tomcat/IK分词器 详细实例.

    今天 不知自己装的centos 出现了什么问题, 一直卡在 启动界面, 找了半天没找见原因(最后时刻还是发现原因, 只因自己手欠一怒之下将centos删除了, 而且选择的是在本地磁盘也删除. ..让我 ...

  2. [Linux]Linux下安装和配置solr/tomcat/IK分词器 详细实例一.

    在这里一下讲解着三个的安装和配置, 是因为solr需要使用tomcat和IK分词器, 这里会通过图文教程的形式来详解它们的安装和使用.注: 本文属于原创文章, 如若转载,请注明出处, 谢谢.关于设置I ...

  3. [Linux]Linux下安装和配置solr/tomcat/IK分词器 详细实例二.

    为了更好的排版, 所以将IK分词器的安装重启了一篇博文,  大家可以接上solr的安装一同查看.[Linux]Linux下安装和配置solr/tomcat/IK分词器 详细实例一: http://ww ...

  4. How to Install Apache Tomcat 8.5 on CentOS 7.3

    How to Install Apache Tomcat 8.5 on CentOS 7.3 From: https://www.howtoforge.com/tutorial/how-to-inst ...

  5. solr + tomcat + mysql整合

    上一次分享了solr+tomcat的整合 学习就是要一步一步的进行才有趣 所以这次给大家分享solr+tomcat+mysql 一.准备工作 1.一张带数据的数据库表(我用的是这张叫merchant的 ...

  6. digitalocean --- How To Install Apache Tomcat 8 on Ubuntu 16.04

    https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04 Intr ...

  7. How To Install Apache Tomcat 7 on CentOS 7 via Yum

    摘自:https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-7-on-centos-7-via-y ...

  8. 关于CentOS 7安装solr+tomcat

    1.Solr7.1.0 安装部署(centos7) Solr7.1.0为目前的最新版,安装环境需要jdk1.8 或者更高,容器我用的tomcat,也建议tomcat8.0或者更高 1.1.下载solr ...

  9. solr + tomcat 搭建

    1.准备jdk7和tomcat72.拷贝solr目录下example/webapps/solr.war,到tomcat下的webapps目录中.3.启动tomcat74.编辑tomcat7中的weba ...

随机推荐

  1. 2016-07-15: Window定时器使用

    windows下定时器使用实例 #include <iostream> #include <Windows.h> using namespace std; void Timer ...

  2. 百度地图API示例之添加/删除工具条、比例尺控件

    代码 <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" cont ...

  3. JS动态获取数据

    JS访问数据,有实时获取数据的时候,请加上时间戳 如:'&stampflag=' + Math.round(new Date().getTime() / 1000); 因为有的浏览器(如IE9 ...

  4. LESS 学习记录(简单入门)

    什么是 LESS LESS是一种动态样式语言,属于 CSS 预处理语言的一种.它使用类似 CSS 的语法,但是 赋予了动态语言的特性,比如变量.继承.运算.函数等,方便 CSS 的编写和维护. 使用 ...

  5. modelsim(1) - 安装和使用 心得

    最近一段时间使用modelsim, 一,安装 使用的时候,出现license验证不对. 由于经常换虚拟机,要注意首先MAC地址是否换了,如果换了,license要重新做! 其次/etc/hosts的I ...

  6. MongoDB-JAVA-Driver 3.2版本常用代码全整理(1) - 增删改

    MongoDB的3.x版本java驱动相对2.x做了全新的设计,类库和使用方法上有很大区别.例如用Document替换BasicDBObject.通过Builders类构建Bson替代直接输入$命令等 ...

  7. CSS-页面布局

    介绍 几个实现多栏布局的方法.主要介绍使用内部div来创建浮动的栏. 多栏布局有三种基本的实现方案:固定宽度.流动.弹性. 固定宽度布局的大小是随用户调整浏览器窗口大小而变化,一般是900至1100像 ...

  8. codeforce div 377

    #include <bits/stdc++.h> using namespace std; #define pb push_back #define lb lower_bound #def ...

  9. 转 A Week with Mozilla's Rust

    转自http://relistan.com/a-week-with-mozilla-rust/ A Week with Mozilla's Rust I want another systems la ...

  10. jquery中append跟prepend的用法

    jquery中append和prepend的用法 append   是插入到元素中,并放到元素内的最后面prepend  是插入到元素中,并放到元素内的最前面例$("body"). ...