当前位置:   article > 正文

从入门到进阶 之 ElasticSearch Kibana 环境配置 安装篇_kibana配置要求

kibana配置要求

默认安装部署所在机器允许外网 

SSH工具 

Putty

链接:https://pan.baidu.com/s/1b6gumtsjL_L64rEsOdhd4A 
提取码:lxs9

Winscp

链接:https://pan.baidu.com/s/1tD8_2knvv0EJ5OYvXP6VTg 
提取码:lxs9 

        WinSCP安装直接下一步到完成(可自己修改软件安装位置),Putty也是下一步到完成。 

         如果安装Putty时修改了安装地址,需要修改WinScp中putty.exe(图2)

安装环境 

参数内核
centos7

CPU - 2核 内存 - 4GB

ElasticSearch/kibana7.17.12(ElasticSearch 7.x后的版本自带JDK,不需要安装

ElasricSearch

下载 

  1. wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.12-linux-x86_64.tar.gz
  2. wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.12-linux-x86_64.tar.gz.sha512
  3. shasum -a 512 -c elasticsearch-7.17.12-linux-x86_64.tar.gz.sha512
  4. tar -xzf elasticsearch-7.17.12-linux-x86_64.tar.gz
  5. cd elasticsearch-7.17.12/

        包说明 

bin:可执行文件在里面,运行es的命令就在这个里面,包含了一些脚本文件等
config:配置文件目录
JDK:java环境
lib:依赖的jar,类库
logs:日志文件
modules:es相关的模块
plugins:可以自己开发的插件
data:这个目录没有,自己新建一下,后面要用 -> mkdir data,这个作为索引目录

 配置Elasticsearch

进入config目录 

cd  elasticsearch-7.17.12/config/

  1. cluster.name: server-master
  2. node.name: salve-1
  3. network.host: 0.0.0.0 #绑定的ip:默认只允许本机访问,修改为0.0.0.0后则可以远程访问
  4. http.port: 9200
  5. path.data: /opt/elasticsearch-7.17.12/data
  6. path.log: /opt/elasticsearch-7.17.12/data

 查看修改的参数

grep -v "#" elasticsearch.yml |  grep -v "^$"

创建数据存储、日志文件夹 

  1. mkdir /opt/elasticsearch-7.17.12/data
  2. mkdir /opt/elasticsearch-7.17.12/logs

更改权限

** ElasticSearch不允许root用户启动和操作,只能使用普通用户
  1. adduser es
  2. chown -R es:es/opt/elasticsearch-7.17.12/

修改JVM参数 

 修改系统配置

修改/etc/security/limits.conf 文件,新增一下参数

  1. * soft nofile 65536
  2. * hard nofile 131072
  3. * soft nproc 2048
  4. * hard nproc 4096

 修改 /etc/sysctl.conf 增加 vm.max_map_count=262145

  1. vim /etc/sysctl.conf
  2. vm.max_map_count=262145

 刷新

sysctl -p

启动ElasticSeasrch 

 切换用户

su es   (es:自己添加的用户)

 启动命令

 ./bin/elasticsearch

启动出现问题

  1. [slave-1] node validation exception
  2. [2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch.
  3. bootstrap check failure [1] of [2]: max number of threads [2048] for user [es] is too low, increase to at least [4096]
  4. bootstrap check failure [2] of [2]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

问题1

[slave-1] node validation exception
  1. elasticsearch.yml新增配置如下:
  2. bootstrap.memory_lock: false
  3. bootstrap.system_call_filter: false

 问题2

the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

修复如下: 

  1. elasticsearch.yml新增配置如下:
  2. # discovery.seed_hosts: 集群主机列表
  3. # discovery.seed_providers: 基于配置文件配置集群主机列表
  4. # cluster.initial_master_nodes: 启动时初始化的参与选主的node,生产环境必填
  5. #添加配置
  6. discovery.seed_hosts: ["127.0.0.1"]
  7. cluster.initial_master_nodes: ["node-1"]

问题3

 max number of threads [2048] for user [es] is too low, increase to at least [4096]

修改/etc/security/limits.conf 文件,将上面我们新增的参数修改一下 

  1. # * soft nproc 2048
  2. * soft nproc 4096

日志文件中出现的错误(不影响启动): 

  1. 修改elasticsearch.yml
  2. ingest.geoip.downloader.enabled: false

 再次启动Elasticsearch

Elasticsearch 修复配置文件

  1. cluster.name: server-master
  2. node.name: salve-1
  3. network.host: 0.0.0.0 #绑定的ip:默认只允许本机访问,修改为0.0.0.0后则可以远程访问
  4. http.port: 9200
  5. path.data: /opt/elasticsearch-7.17.12/data
  6. path.log: /opt/elasticsearch-7.17.12/data
  7. bootstrap.memory_lock: false
  8. bootstrap.system_call_filter: false
  9. discovery.seed_hosts: ["127.0.0.1"]
  10. cluster.initial_master_nodes: ["slave-1"]

 测试

        解决所有问题了 ,怀着无比激动的心 下

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/812618
推荐阅读
相关标签