elasticsearch|大数据|kibana的安装(https+密码)

这篇具有很好参考价值的文章主要介绍了elasticsearch|大数据|kibana的安装(https+密码)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

前言:

kibana是比较好安装的,但https+密码就比较麻烦一些了,下面将就如何安装一个可在生产使用的kibana做一个简单的讲述

一,

kibana版本和下载地址

这里我想还是强调一下,kibana的版本需要和elasticsearch的版本一致,小版本都不能差,否则,kibana将不能正确连接到elasticsearch

本例我使用的是elasticsearch-6.3.2版本,因此,下载的kibana版本也是6.3.2

官方下载地址:

Kibana 6.3.2 | Elastic

kibana安装,大数据,大数据,elasticsearch,搜索引擎,https,数据库,云原生

两个版本二进制和rpm基本没有什么区别,想折腾点就二进制了,不想太麻烦rpm即可,看自己的需求啦。

不过要吐槽一下,官网下载比较慢,即使科学上网仍然很慢,因此,是需要一点耐心了

下载完毕后,没什么好说的,扔到服务器上就可以了

二,

elasticsearch的证书

kibana是安装在192.168.123.15上面的(kibana是node项目,可以安装在任意的服务器上,不需要配置node环境

elasticsearch|大数据|elasticsearch的api部分实战操作以及用户和密码的管理-CSDN博客 这个是elasticsearch集群的https开启,部署的时候没有添加192.168.123.15,因此,重新生成证书:

[root@node4 ~]# cat instances.yml 
instances:
  - name: "node-1"
    dns: ['192.168.123.11']
  - name: "node-2"
    dns: ['192.168.123.12']
  - name: "node-3"
    dns: ['192.168.123.13']    
  - name: 'node-4'
    dns: ['192.168.123.14']
  - name: 'node-5'
    dns: ['192.168.123.15']

执行以下命令生成证书包:

###注:生成的证书格式是pem的,可以直接使用,无需任何转换(哪个服务器都可以,随便找个服务器就可以了)

/data/es/bin/x-pack/certutil cert ca --pem --in instances.yml --out /root/certs.zip
解压上面在root根目录下生成的证书包

在15服务器上,证书放置在此目录下/opt/kibana/(kibana整个也是放置在opt目录下的,二进制方式部署):

[root@centos5 kibana]# ls -al ca.crt node-5.crt node-5.key 
-rw-r--r-- 1 root root 1200 Dec 15 23:07 ca.crt
-rw-r--r-- 1 root root 1180 Dec 15 23:07 node-5.crt
-rw-r--r-- 1 root root 1679 Dec 15 23:07 node-5.key

证书重新分发到elasticsearch集群,然后重启elasticsearch集群  

kibana的配置文件:

####注意,密码必须双引号包裹,否则kibana识别不了,会报错,其次是elasticsearch.url 的值是elasticsearch集群的任意一个节点URL就可以了,不需要全部节点都列出

####elasticsearch.ssl.verificationMode: certificate 和elasticsearch的设置一致

[root@centos5 kibana]# cat config/kibana.yml 
# Kibana is served by a back end server. This setting specifies the port to use.
server.port: 15666

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
server.host: 192.168.123.15

# Enables you to specify a path to mount Kibana at if you are running behind a proxy.
# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
# from requests it receives, and to prevent a deprecation warning at startup.
# This setting cannot end in a slash.
#server.basePath: ""

# Specifies whether Kibana should rewrite requests that are prefixed with
# `server.basePath` or require that they are rewritten by your reverse proxy.
# This setting was effectively always `false` before Kibana 6.3 and will
# default to `true` starting in Kibana 7.0.
#server.rewriteBasePath: false

# The maximum payload size in bytes for incoming server requests.
#server.maxPayloadBytes: 1048576

# The Kibana server's name.  This is used for display purposes.
server.name: mykibana

# The URL of the Elasticsearch instance to use for all your queries.
elasticsearch.url: https://192.168.123.11:19200

# When this setting's value is true Kibana uses the hostname specified in the server.host
# setting. When the value of this setting is false, Kibana uses the hostname of the host
# that connects to this Kibana instance.
#elasticsearch.preserveHost: true

# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn't already exist.
#kibana.index: ".kibana"

# The default application to load.
#kibana.defaultAppId: "home"

# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
elasticsearch.username: elastic
elasticsearch.password: "123456"

# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
server.ssl.enabled: true
server.ssl.certificate: /opt/kibana/node-5.crt
server.ssl.key: /opt/kibana/node-5.key

# Optional settings that provide the paths to the PEM-format SSL certificate and key files.
# These files validate that your Elasticsearch backend uses the same key files.
#elasticsearch.ssl.certificate: /path/to/your/client.crt
#elasticsearch.ssl.key: /path/to/your/client.key

# Optional setting that enables you to specify a path to the PEM file for the certificate
# authority for your Elasticsearch instance.
elasticsearch.ssl.certificateAuthorities: [ "/opt/kibana/ca.crt" ]

# To disregard the validity of SSL certificates, change this setting's value to 'none'.
elasticsearch.ssl.verificationMode: certificate

# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
# the elasticsearch.requestTimeout setting.
#elasticsearch.pingTimeout: 1500

# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
# must be a positive integer.
#elasticsearch.requestTimeout: 30000

# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
# headers, set this value to [] (an empty list).
#elasticsearch.requestHeadersWhitelist: [ authorization ]

# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
#elasticsearch.customHeaders: {}

# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
#elasticsearch.shardTimeout: 30000

# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
#elasticsearch.startupTimeout: 5000

# Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
#elasticsearch.logQueries: false

# Specifies the path where Kibana creates the process ID file.
#pid.file: /var/run/kibana.pid

# Enables you specify a file where Kibana stores log output.
logging.dest: /var/log/kibana/kibana.log

# Set the value of this setting to true to suppress all logging output.
#logging.silent: false

# Set the value of this setting to true to suppress all logging output other than error messages.
#logging.quiet: false

# Set the value of this setting to true to log all events, including system usage information
# and all requests.
#logging.verbose: false

# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 5000.
#ops.interval: 5000

# The default locale. This locale can be used in certain circumstances to substitute any missing
# translations.
i18n.defaultLocale: "zh-CN"

根据配置文件,创建目录(kibana.log文件会自动生成)

mkdir /var/log/kibana

三,

启动kibana

/opt/kibana/bin/kibana

此时是前台启动,直接看日志:

###提示kibana的版本是6.3.2,但elasticsearch的版本是6.2.4版本,

[root@centos5 kibana]# tail -n 10  /var/log/kibana/kibana.log 
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:searchprofiler@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:ml@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:tilemap@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:watcher@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:index_management@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:graph@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:security@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:grokdebugger@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:logstash@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}
{"type":"log","@timestamp":"2023-12-15T23:48:48Z","tags":["status","plugin:reporting@6.3.2","info"],"pid":1572,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"This version of Kibana requires Elasticsearch v6.3.2 on all nodes. I found the following incompatible nodes in your cluster: v6.2.4 @ 192.168.123.14:19200 (192.168.123.14), v6.2.4 @ 192.168.123.13:19200 (192.168.123.13), v6.2.4 @ 192.168.123.12:19200 (192.168.123.12), v6.2.4 @ 192.168.123.11:19200 (192.168.123.11)"}

kibana的启动脚本:

cat >/etc/systemd/system/kibana.service <<EOF
[Unit]
Description=Kibana
 
[Service]
Type=simple
User=kibana
Group=kibana
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
EnvironmentFile=-/etc/default/kibana
EnvironmentFile=-/etc/sysconfig/kibana
ExecStart=/opt/kibana/bin/kibana "-c /opt/kibana/config/kibana.yml"
Restart=always
WorkingDirectory=/

[Install]
WantedBy=multi-user.target
EOF

 ###按实际的kibana存放路径和kibana.yml 文件路径填写,这里出于安全考虑使用的是kibana这个普通用户,因此,需要创建该普通用户,并将kibana和kibana日志给予普通用户kibana的权限

[root@centos5 ~]# useradd kibana
[root@centos5 ~]# chown -Rf kibana. /opt/kibana/
[root@centos5 ~]# chown -Rf kibana. /var/log/kibana/
[root@centos5 ~]# systemctl enable kibana
Created symlink from /etc/systemd/system/multi-user.target.wants/kibana.service to /etc/systemd/system/kibana.service.
[root@centos5 ~]# systemctl restart kibana
[root@centos5 ~]# systemctl status kibana
● kibana.service - Kibana
   Loaded: loaded (/etc/systemd/system/kibana.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2023-12-16 12:08:47 CST; 5s ago
 Main PID: 2191 (node)
   CGroup: /system.slice/kibana.service
           └─2191 /opt/kibana/bin/../node/bin/node --no-warnings /opt/kibana/bin/../src/cli -c /opt/kibana/config/kibana.yml

Dec 16 12:08:47 centos5 systemd[1]: Started Kibana.

浏览器输入:https://192.168.123.15:15666 

kibana安装,大数据,大数据,elasticsearch,搜索引擎,https,数据库,云原生

登录界面输入账号elastic,密码123456

报错,kibana版本和elasticsearch版本不匹配

kibana安装,大数据,大数据,elasticsearch,搜索引擎,https,数据库,云原生

 

解决方案为升级或者迁移elasticsearch集群到6.3.2版本,这里就展开说了,篇幅太长了。 文章来源地址https://www.toymoban.com/news/detail-853046.html

到了这里,关于elasticsearch|大数据|kibana的安装(https+密码)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Elasticsearch (ES) 搜索引擎: 数据类型、动态映射、多类型(子字段)

    原文链接:https://xiets.blog.csdn.net/article/details/132348634 版权声明:原创文章禁止转载 专栏目录:Elasticsearch 专栏(总目录) ES 映射字段的 数据类型 ,官网文档参考:Field data types。 下面是 ES 常用的一些基本数据类型。 字符串 类型: keyword :类型。 text :文本类型。

    2024年03月23日
    浏览(63)
  • docker安装elasticsearch与head教程完整版—.NET Core Web Api与elasticsearch打造全站全文搜索引擎

    默认已经有docker环境 下载与安装 elasticsearch ,从hub.docker里面可以看到最新版本的镜像,选择你想要的版本 本教程是以 7.17.7 为案例,为啥不适用最新的,首先个人一般需用最新的版本,如果有亢很难填,其次我自己的服务器下载的太慢(还是配置了docker加速地址的)拉取几

    2024年02月10日
    浏览(44)
  • elasticsearch(ES)分布式搜索引擎04——(数据聚合,自动补全,数据同步,ES集群)

    **聚合(aggregations)**可以让我们极其方便的实现对数据的统计、分析、运算。例如: 什么品牌的手机最受欢迎? 这些手机的平均价格、最高价格、最低价格? 这些手机每月的销售情况如何? 实现这些统计功能的比数据库的sql要方便的多,而且查询速度非常快,可以实现近

    2024年02月08日
    浏览(46)
  • Docker安装ElasticSearch、Kibana、IK分词器以及设置ES账户密码

    版本声明: 系统 :CentOS 7.9(云服务器) ES版本 :7.6.1 Kibana :7.6.1 Ik分析器版本 :7.6.1 1、拉取镜像 2、创建挂载目录 设置所有用户读写执行权限 : sudo chmod -R 777 /docker_config/elasticsearch/ 3、创建elasticsearch.yml 配置文件 4、创建容器 参数说明 : -p 端口映射 -e discovery.type=single

    2023年04月09日
    浏览(65)
  • docker安装elasticsearch kibana 8.6.0(设置密码+汉化+ik分词器)

    记得开放使用的端口,或者关闭防火墙 提示:需要提升虚拟机或者服务器的内存到8G以上 拉取镜像并安装 设置密码 进入es容器,设置密码 生成签名 把这一串复制到kibana网页(服务器ip+5601)中 记得要快,好像是30分钟的期限 出现验证代码请求 退出es,进入kibana容器生成code 复制这个

    2024年02月03日
    浏览(48)
  • 微服务04 分布式搜索引擎 elasticsearch DSL数据聚合 自动补全 数据同步 集群 Sentinel

    聚合(aggregations)可以让我们极其 方便的实现对数据的统计、分析、运算 。例如: 什么品牌的手机最受欢迎? 这些手机的平均价格、最高价格、最低价格? 这些手机每月的销售情况如何? 实现这些 统计功能的比数据库的sql要方便的多,而且查询速度非常快 ,可以实现近

    2024年02月11日
    浏览(49)
  • 《Spring Boot 实战派》--13.集成NoSQL数据库,实现Elasticsearch和Solr搜索引擎

             关于搜索引擎 我们很难实现 Elasticseach 和 Solr两大搜索框架的效果;所以本章针对两大搜索框架,非常详细地讲解 它们的原理和具体使用方法, 首先 介绍什么是搜索引擎 、如何用 MySQL实现简单的搜索引擎,以及Elasticseach 的 概念和接口类; 然后介绍Elasticseach

    2023年04月09日
    浏览(87)
  • 微服务04 分布式搜索引擎 elasticsearch DSL数据聚合 自动补全 数据同步 集群 微服务保护 Sentinel

    聚合(aggregations)可以让我们极其 方便的实现对数据的统计、分析、运算 。例如: 什么品牌的手机最受欢迎? 这些手机的平均价格、最高价格、最低价格? 这些手机每月的销售情况如何? 实现这些 统计功能的比数据库的sql要方便的多,而且查询速度非常快 ,可以实现近

    2024年02月15日
    浏览(53)
  • ES搜索引擎入门+最佳实践(九):项目实战(二)--elasticsearch java api 进行数据增删改查

            本篇是这个系列的最后一篇了,在这之前可以先看看前面的内容: ES搜索引擎入门+最佳实践(一)_flame.liu的博客-CSDN博客 ES搜索引擎入门+最佳实践(二)_flame.liu的博客-CSDN博客 ES搜索引擎入门+最佳实践(三)_flame.liu的博客-CSDN博客 ES搜索引擎入门+最佳实践(四)_flame.liu的博客

    2024年02月12日
    浏览(53)
  • windows环境下elasticsearch8.1.0+kibana8.1.0安装教程(用户密码版)

    一:JDK环境(不做介绍) 二:安装ElasticSearch ①:下载地址: elasticsearch地址: https://www.elastic.co/cn/downloads/elasticsearch kibana地址: https://www.elastic.co/cn/downloads/kibana ②:下载安装包后解压 ③:win+r打开cmd(命令提示符),启动 .binelasticsearch.bat 进入安装路径下: 执行:.bin

    2023年04月10日
    浏览(38)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包