下载elasticsearch安装包解压
我的是5.2.0版本
配置安装目录下的config/elasticsearch.yml文件
cluster.name: IOT
node.name: es_node_1
node.master: true
http.port: 9200
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs
network.host: 172.16.22.11
discovery.zen.ping.unicast.hosts: ["172.16.22.11:9300", "172.16.22.11:9300", "172.16.22.11:9300"]
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping_timeout: 10s
http.cors.enabled: true
http.cors.allow-origin: "*"
运行./bin/elasticsearch出现报错
ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
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=655360
并执行命令:
sudo sysctl -p
安装kibana(日志分析平台)
解压即安装
然后修改config/kibana.yml文件
elasticsearch.url: "http://172.16.22.11:9200"
server.host: 172.16.22.11
安装x-pack(Watcher,Marvel,Graph插件的集合)
下载安装包x-pack5.2.0
放到一个目录下比如/tmp
到elasticsearch安装目录下运行
bin/elasticsearch-plugin install file:///tmp/x-pack-5.2.0.zip
然后再到kibana安装目录下运行
bin/kibana-plugin install file:///tmp/x-pack-5.2.0.zip
注:elasticsearch,kibana,x-pack版本一定要对应,
我的都是5.2.0安装x-pack时如果直接跳到bin目录下直接运行
kibana-plugin install file:///tmp/x-pack-5.2.0.zip或者elasticsearch-plugin install file:///tmp/x-pack-5.2.0.zip会报错,一定要到elasticsearch和kibana目录下不能到bin目录下
elasticsearch5.0安装填坑
最新推荐文章于 2024-09-08 09:36:50 发布