首页 > 其他 > 详细

Elasticsearch的安装和使用

时间:2019-05-14 16:18:27      阅读:107      评论:0      收藏:0      [点我收藏+]

Elasticsearch的安装和使用

Elasticsearch的下载

下载地址:https://www.elastic.co/downloads/elasticsearch

技术分享图片

环境准备:

  1. 安装jdk
  2. 修改系统配置

echo "fs.file-max = 1000000" >> /etc/sysctl.conf

echo “fs.nr_open=6553501” >> /etc/sysctl.conf
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
echo "vm.swappiness = 1" >> /etc/sysctl.conf

sysctl -p
sed -i ‘s/* soft nofile 65535/* soft nofile 655350/g‘ /etc/security/limits.conf
sed -i ‘s/* hard nofile 65535/* hard nofile 655350/g‘ /etc/security/limits.conf

 

 

修改es配置:config/elasticsearch.yml

[elasticsearch@es01 elasticsearch-5.6.3]$ egrep -v ‘^#|^$‘ config/elasticsearch.yml

node.name: es01

network.host: 0.0.0.0

http.port: 9200

 

配置内存的使用:

Config/jvm.properties

技术分享图片

elasticsearch不能在root下运行,需要添加用户

useradd elasticsearch

su elasticsearch

bin/elasticsearch –d

验证是否ok

技术分享图片

技术分享图片

技术分享图片

技术分享图片

本地集群模式启动

[elasticsearch@es01 elasticsearch-5.6.3]$ bin/elasticsearch -Ehttp.port=7200 -Epath.data=es01

[elasticsearch@es01 elasticsearch-5.6.3]$ bin/elasticsearch -Ehttp.port=8200 -Epath.data=es02

[elasticsearch@es01 elasticsearch-5.6.3]$ bin/elasticsearch -Ehttp.port=7200 -Epath.data=es03

技术分享图片

 

Elasticsearch的安装和使用

原文:https://www.cnblogs.com/reblue520/p/10862671.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!