ES 5.x版本的搭建。

来源:互联网 发布:淘宝购买无卡支付业务 编辑:程序博客网 时间:2024/05/29 19:25

elasticsearch-5.6.1.tar.gz

kibana-5.6.1-linux-x86_64.tar.gz

logstash-5.6.1.tar.gz

一、elasticsearch安装配置

1.由于es需要非root用户启动,于是我创建了一个用户elk

(想用root用户网上很多博客写到更改配置文件,可惜我这边并没有生效,希望可以有大神帮我解一下疑惑。)

useradd elk

2.解压elasticsearch-5.6.1.tar.gz

tar -zxvf elasticsearch-5.6.1.tar.gz -C /usr/local

3.更改目录的用户和组

chown -R elk.elk /usr/local/elasticsearch-5.6.1

4.切换用户

su elk

5.修改配置文件

vi /usr/local/elasticsearch-5.6.1/config/elasticsearch.yml


cluster.name: esnode.name: node0network.host: ipbootstrap.memory_lock: falsebootstrap.system_call_filter: false


6.在root用户下修改系统配置文件

由于启动es时报这样的错误,会直接stop,参照网上的博客对系统配置文件做了如下更改

ERROR: [2] bootstrap checks failed[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536][2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]


vi /etc/security/limits.conf

* soft nofile 65536* hard nofile 131072* soft nproc 2048* hard nproc 4096


vi /etc/sysctl.conf

vm.max_map_count=262144


sysctl -p


神奇的时刻到了

/usr/local/elasticsearch-5.6.1/bin/elasticsearch -d

翻滚吧,蛋炒饭。es成功运行于后台




访问 http://ip:9200









原创粉丝点击