1、Download Elasticsearch
https://www.elastic.co/downloads/elasticsearch
2、Create Directory
/usr/local/elasticsearch-6.2.4
3、Add User
groupadd elasticsearch
useradd -g elasticsearch elasticsearch
4、Set Permission
chown -R elasticsearch:elasticsearch /usr/local/elasticsearch-6.2.4
5、Change Parameters
vim /config/elasticsearch.yml
cluster.name: searchGo
node.name: es-110.benlai.com
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 0.0.0.0
http.port: 9200
discovery.zen.ping.unicast.hosts: ["es-110.benlai.com", "es-17.benlai.com"]
discovery.zen.minimum_master_nodes: 2
vim /config/jvm.options
-Xms8g
-Xmx8g
vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 2048
* hard nproc 4096
* soft memlock unlimited
* hard memlock unlimited
vim /etc/security/limits.d/90-nproc.conf
* soft nproc 4096
sysctl -w vm.max_map_count=655360
6、Setup Elasticsearch
su elasticsearch
./bin/elasticsearch -d
7、安装IK插件
https://github.com/medcl/elasticsearch-analysis-ik/releases
unzip plugin to folder /usr/local/elasticsearch-6.2.4/plugins/
restart elasticsearch