elasticsearch 二进制部署

Posted 冬眠的熊哎

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了elasticsearch 二进制部署相关的知识,希望对你有一定的参考价值。

[root@localhost home]#cd /home
[root@localhost home]#groupadd elasticsearch
[root@localhost home]#useradd elasticsearch -g elasticsearch
[root@localhost home]#mkdir ELK
[root@localhost home]#cd ELK
[root@localhost ELK]#mkdir logs
[root@localhost home]#chown -R elasticsearch.elasticsearch /home/ELK
[root@localhost home]#vim /etc/security/limits.conf
* soft nproc 655350
* hard nproc 655350
* soft nofile 655350
* hard nofile 655350
[root@localhost home]#vim /etc/sysctl.conf
vm.max_map_count=655350
[root@localhost home]# sysctl -p
3、下载安装包(下载安装包这步就不要下载了 直接上传解压就行)
[root@localhost home]#cd ELK
[root@localhost home]#wget
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.tar.gz

4、安装ElasticSerach

[root@localhost ELK]#tar -zxvf elasticsearch-6.5.4.tar.gz
[root@localhost ELK]#mv elasticsearch-6.5.4 elasticsearch
[root@localhost ELK]#vim /home/ELK/elasticsearch/config/elasticsearch.yml
http.host: 0.0.0.0
node.name: node-1
node.master: true
node.data: true
http.port: 9200
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type
network.host: 0.0.0.0
transport.tcp.port: 9300
cluster.name: elasticsearch
network.publish_host: 192.168.100.100
thread_pool.bulk.queue_size: 500
[root@localhost home]#chown -R elasticsearch.elasticsearch /home/ELK/elasticsearch

切换用户、开启es,后台运行

[root@localhost ELK]#su elasticsearch
[elasticsearch@localhost ELK]$cd /home/ELK/elasticsearch
[elasticsearch@localhost elasticsearch]$ bin/elasticsearch -d

测试elasticsearch

[root@localhost ELK]#curl http://192.168.100.100:9200

"name" : "node-1",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "-aIxuU23QYqgdA7y7rzV_w",
"version" : 
"number" : "6.5.4",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "d2ef93d",
"build_date" : "2018-12-17T21:17:40.758843Z",
"build_snapshot" : false,
"lucene_version" : "7.5.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
,
"tagline" : "You Know, for Search"

5、kibana部署

[root@localhost ELK]# tar -zxvf kibana-6.5.4-linux-x86_64.tar.gz
[root@localhost ELK]# mv kibana-6.5.4-linux-x86_64 kibana
[root@localhost ELK]# vim /home/ELK/kibana/config/kibana.yml
server.port: 5601
server.host: "192.168.100.100"
elasticsearch.url: "http://192.168.100.100:9200"
pid.file: /home/ELK/run/kibana.pid

开启kibana(查看日志是否报错)

[root@localhost ELK]# mkdir run
[root@localhost ELK]# cd kibana
[root@localhost kibana]# chown -R elasticsearch.elasticsearch /home/ELK
[root@localhost kibana]# nohup bin/kibana &
[root@localhost kibana]# tail -f nohup.out

测试
浏览器访问 http://192.168.100.100:5601

以上是关于elasticsearch 二进制部署的主要内容,如果未能解决你的问题,请参考以下文章

elasticsearch+logstash+kibana部署

elasticsearch集群部署

elasticsearch 单机部署

Docker 简单部署 ElasticSearch

elasticsearch+kibana+metricbeat安装部署方法

Elasticsearch介绍及安装部署