ElasticSearch(2)-安装ElasticSearch

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

扫描二维码关注公众号,回复: 980073 查看本文章

7、安装IK插件

https://github.com/medcl/elasticsearch-analysis-ik/releases
unzip plugin to folder /usr/local/elasticsearch-6.2.4/plugins/
restart elasticsearch

8、验证

http://192.168.0.105:8000/_analyze?analyzer=ik_smart&text=%E8%81%94%E6%83%B3%E6%98%AF%E5%85%A8%E7%90%83%E6%9C%80%E5%A4%A7%E7%9A%84%E7%AC%94%E8%AE%B0%E6%9C%AC%E5%8E%82%E5%95%86

猜你喜欢

转载自www.cnblogs.com/vongzh/p/9072157.html