需先安装java7 maven
1、下载安装包,解压到指定目录
wget
https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.2.tar.gz tar -xvf elasticsearch-1.5.2.tar.gz
2、安装插件
bin/plugin -install lukas-vlcek/bigdesk
bin/plugin -install mobz/elasticsearch-head
3、安装ik中文分词
1)下载源码 wget
https://codeload.github.com/medcl/elasticsearch-analysis-ik/zip/master 2)用maven编译
cd elasticsearch-analysis-ik-master
mvn package
3)拷贝安装文件
mkdir plugins/analysis-ik
cp elasticsearch-analysis-ik-master/target/releases/elasticsearch-analysis-ik-1.2.9.zip plugins/analysis-ik
tar -xvf elasticsearch-analysis-ik-1.2.9.zip
4)拷贝词库
mkdir config/ik
cp elasticsearch-analysis-ik-master/config/ik/ config/ik/
4、修改配置文件
在config/elasticsearch.yml添加
index.analysis.analyzer.ik.type : ik
index.analysis.analyzer.default.type : ik
indices.fielddata.cache.size : 20%
indices.cache.filter.size : 20%
修改cluster name
cluster.name: my_cluster
5、修改系统配置