1. 解压ES安装包
tar xvf elasticsearch-2.3.3.tar.gz
mv elasticsearch-2.3.3/ /usr/local/lib/elasticsearch-2.3.3/
2. 修改ES默认配置
cd /usr/local/lib/elasticsearch-2.3.3/config
nano elasticsearch.yml
# 修改集群名称
cluster.name: cluster_name
# 修改节点名称
node.name: node-01
# 修改绑定IP地址
network.host 0.0.0.0
# 自定义端口
http.port: 9200
# 自动探测同集群节点的Hosts列表
discovery.zen.ping.unicast.hosts: ["192.168.131.129"]
# 组成集群的最少节点数
discovery.zen.minimum_master_nodes: 2
3. 创建elasticsearch账户
useradd elasticsearch
passwd elasticsearch
su elasticsearch
4. 修改ES目录权限、以及防火墙权限
cd /usr/local/lib
chown -R elasticsearch ./elasticsearch-2.3.3/
firewall-cmd --permanent --zone=trusted --add-source=192.168.0.0/16
firewall-cmd --reload
5. 安装head插件
cd /usr/local/lib/elasticsearch-2.3.3/bin
sudo ./plugin install mobz/elasticsearch-head
浏览器输入http://ip:9200/_plugin/head/
7. 安装IK分词器
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
yum install apache-maven
unzip elasticsearch-analysis-ik-1.9.3.zip
cd elasticsearch-analysis-ik-master
mvn clean package
mkdir /usr/local/lib/elasticsearch-2.3.3/plugins/ik/
cp target/releases/elasticsearch-analysis-ik-1.9.3.zip /usr/local/lib/elasticsearch-2.3.3/plugins/ik/elasticsearch-analysis-ik-1.9.3.zip
cd /usr/local/lib/elasticsearch-2.3.3/plugins/ik/
unzip elasticsearch-analysis-ik-1.9.3.zip
# unzip sonatype.zip
# mv sonatype/ /root/.m2/repository/org/sonatype/
8. 安装mapper-attachments插件
cd /usr/local/lib/elasticsearch-2.3.3/bin
sudo ./plugin install mapper-attachments
使用教程
https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-attachments.html
https://gist.github.com/karmi/5594127