ES和Kibana的安装

Elasticsearch

安装和启动:

手动下载地址:https://www.elastic.co/cn/downloads/elasticsearch
linux下命令行下载和启动:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.0-linux-x86_64.tar.gz
tar -xzvf elasticsearch-7.16.0-linux-x86_64.tar.gz
cd elasticsearch-7.16.0
./bin/elasticsearch
#验证服务启动成功
curl http://localhost:9200/

服务启动成功,返回信息如下:

{
  "name" : "node-1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "fglq3Guo566T86ZdEhs-Z2k7w",
  "version" : {
    "number" : "7.16.0",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "6fc81662312141fe7583691d7c1c91b8658ac17aa0d",
    "build_date" : "2021-12-02T15:46:35.697268109Z",
    "build_snapshot" : false,
    "lucene_version" : "8.10.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Kibana

安装和启动:

手动下载地址:https://www.elastic.co/cn/downloads/kibana
linux下命令行下载和启动:

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.16.0-linux-x86_64.tar.gz
tar -xzvf kibana-7.16.0-linux-x86_64.tar.gz
cd kibana-7.16.0
./bin/kibana
#验证服务启动成功
http://localhost:5601/

如果服务启动成功,访问http://localhost:5601/,会出现如下界面:
在这里插入图片描述

常见报错和解决办法

Elasticsearch

报错1
ERROR: [2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch.
bootstrap check failure [1] of [2]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
bootstrap check failure [2] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决办法:
root权限下,在/etc/security/limits.conf 文件中追加两行

elk hard nofile 65536
elk soft nofile 65536  

root权限下,在/etc/sysctl.conf 文件中追加一行

vm.max_map_count=655360

执行 sysctl -p

报错2

如果只能本地访问http://localhost:9200/,但是远程服务器不能访问这台机器的ES
解决办法:
修改config/elasticsearch.yml的配置,具体如下:

network.host: 0.0.0.0
node.name: node-1
cluster.initial_master_nodes: ["node-1"]

Kibana

报错1

如果只能本地访问http://localhost:5601/,但是远程服务器不能访问这台机器的Kibana
解决办法:
修改config/kibana.yml的配置,具体如下:

server.host: "0.0.0.0"
报错2

访问http://localhost:5601/,界面出现Kibana Server not ready yet,启动页面报错为:

Waiting until all Elasticsearch nodes are compatible with Kibana before start......

解决办法:
修改config/elasticsearch.yml的配置,具体如下:

network.host: 0.0.0.0
node.name: node-1
discovery.seed_hosts: ["127.0.0.1"]
cluster.initial_master_nodes: ["node-1"]
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值