首页 > 系统相关 >centos7.9搭建ES8.12+Kibana8.12

centos7.9搭建ES8.12+Kibana8.12

时间:2024-03-13 15:33:42浏览次数:29  
标签:03 05 Kibana8.12 kibana 2024 centos7.9 source ES8.12 start

学习来源https://blog.csdn.net/fen_fen/article/details/124596440

 

一、创建ES用户

groupadd es

useradd -g es es

passwd es

二、下载安装包

https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.12.2-linux-x86_64.tar.gz

三、将下载好的包上传到安装机器,并改变所属用户和组

tar -zxvf elasticsearch-8.12.2-linux-x86_64.tar.gz

chown -R es:es elasticsearch-8.12.2

四、启动es

1.切换到es用户

su - es

2.修改config下的jvm.options

-Xms16g
-Xmx16g

3.修改config下的elasticsearch.yml

network.host: 0.0.0.0

http.port: 9200

4.启动es

进入bin目录,执行./elasticsearch启动

启动过程中会有如下提示

✅ Elasticsearch security features have been automatically configured!
✅ Authentication is enabled and cluster connections are encrypted.

ℹ️ Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
YL-y61L+E3T4OnJT95L8

ℹ️ HTTP CA certificate SHA-256 fingerprint:
3bf198f3bee08dc8e4322dee03391da2c4f599e034800227dc24a5207665909f

ℹ️ Configure Kibana to use this cluster:
• Run Kibana and click the configuration link in the terminal when Kibana starts.
• Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
eyJ2ZXIiOiI4LjEyLjIiLCJhZHIiOlsiMTcyLjE3LjAuMTo5MjAwIl0sImZnciI6IjNiZjE5OGYzYmVlMDhkYzhlNDMyMmRlZTAzMzkxZGEyYzRmNTk5ZTAzNDgwMDIyN2RjMjRhNTIwNzY2NTkwOWYiLCJrZXkiOiJqMnlGTm80QlFaV21wZHN0ckRxUzpDWE8tU0ZQSlRCQ1YwMkt1MU5RV01BIn0=

ℹ️ Configure other nodes to join this cluster:
• Copy the following enrollment token and start new Elasticsearch nodes with `bin/elasticsearch --enrollment-token <token>` (valid for the next 30 minutes):
eyJ2ZXIiOiI4LjEyLjIiLCJhZHIiOlsiMTcyLjE3LjAuMTo5MjAwIl0sImZnciI6IjNiZjE5OGYzYmVlMDhkYzhlNDMyMmRlZTAzMzkxZGEyYzRmNTk5ZTAzNDgwMDIyN2RjMjRhNTIwNzY2NTkwOWYiLCJrZXkiOiJqbXlGTm80QlFaV21wZHN0ckRxUzpzbUdlaUNWRlQ0V1BKWXh1Z0ZfdC1BIn0=

If you're running in Docker, copy the enrollment token and run:
`docker run -e "ENROLLMENT_TOKEN=<token>" docker.elastic.co/elasticsearch/elasticsearch:8.12.2`

(启动过程中,因之前配置了全局的java的classpath,多了个空格,导致启动报错,注释掉/etc/profile下的配置,启动成功;尝试修改密码,执行了bin/elasticsearch-reset-password -u elastic,随机生成了另一串,并不能改成简单密码,以后再测试)

五、远程访问ES

打开浏览器,输入https://192.168.1.25:9200

需要输入用户密码,就是启动时提示的这一段,用户elastic,密码YL-y61L+E3T4OnJT95L8

ℹ️ Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
YL-y61L+E3T4OnJT95L8

 

六、创建kibana用户

groupadd kibana

useradd -m -g kibana kibana

passwd kibana

七、下载kibana

https://artifacts.elastic.co/downloads/kibana/kibana-8.12.2-linux-x86_64.tar.gz

八、将下载好的包上传到安装机器,并改变所属用户和组

tar -zxvf kibana-8.12.2-linux-x86_64.tar.gz

chown -R kibana:kibana kibana-8.12.2

九、启动kibana

1.切换到kibana用户

su kibana

2.修改config目录的kibana.yml配置文件

server.port: 5601

server.host: "0.0.0.0"

server.name: "kibana"

elasticsearch.hosts: ["https://192.168.1.25:9200"]

3.启动kibana

进入bin目录,执行./kibana

[kibana@node3 bin]$ ./kibana
Kibana is currently running with legacy OpenSSL providers enabled! For details and instructions on how to disable see https://www.elastic.co/guide/en/kibana/8.12/production.html#openssl-legacy-provider
{"log.level":"info","@timestamp":"2024-03-13T07:05:36.953Z","log.logger":"elastic-apm-node","ecs.version":"8.10.0","agentVersion":"4.2.0","env":{"pid":42394,"proctitle":"./../node/bin/node","os":"linux 3.10.0-1160.el7.x86_64","arch":"x64","host":"node3","timezone":"UTC+0800","runtime":"Node.js v18.18.2"},"config":{"active":{"source":"start","value":true},"breakdownMetrics":{"source":"start","value":false},"captureBody":{"source":"start","value":"off","commonName":"capture_body"},"captureHeaders":{"source":"start","value":false},"centralConfig":{"source":"start","value":false},"contextPropagationOnly":{"source":"start","value":true},"environment":{"source":"start","value":"production"},"globalLabels":{"source":"start","value":[["kibana_uuid","c5de110e-c11f-41cd-9d84-0aefe81a5eca"],["git_rev","f5bd489c5ff9c676c4f861c42da6ea99ae350832"]],"sourceValue":{"kibana_uuid":"c5de110e-c11f-41cd-9d84-0aefe81a5eca","git_rev":"f5bd489c5ff9c676c4f861c42da6ea99ae350832"}},"logLevel":{"source":"default","value":"info","commonName":"log_level"},"metricsInterval":{"source":"start","value":120,"sourceValue":"120s"},"serverUrl":{"source":"start","value":"https://kibana-cloud-apm.apm.us-east-1.aws.found.io/","commonName":"server_url"},"transactionSampleRate":{"source":"start","value":0.1,"commonName":"transaction_sample_rate"},"captureSpanStackTraces":{"source":"start","sourceValue":false},"secretToken":{"source":"start","value":"[REDACTED]","commonName":"secret_token"},"serviceName":{"source":"start","value":"kibana","commonName":"service_name"},"serviceVersion":{"source":"start","value":"8.12.2","commonName":"service_version"}},"activationMethod":"require","message":"Elastic APM Node.js Agent v4.2.0"}
[2024-03-13T15:05:40.090+08:00][INFO ][root] Kibana is starting
[2024-03-13T15:05:40.192+08:00][INFO ][node] Kibana process configured with roles: [background_tasks, ui]
[2024-03-13T15:05:56.894+08:00][INFO ][plugins-service] Plugin "cloudChat" is disabled.
[2024-03-13T15:05:56.920+08:00][INFO ][plugins-service] Plugin "cloudExperiments" is disabled.
[2024-03-13T15:05:56.921+08:00][INFO ][plugins-service] Plugin "cloudFullStory" is disabled.
[2024-03-13T15:05:57.779+08:00][INFO ][plugins-service] Plugin "profilingDataAccess" is disabled.
[2024-03-13T15:05:57.780+08:00][INFO ][plugins-service] Plugin "profiling" is disabled.
[2024-03-13T15:05:58.022+08:00][INFO ][plugins-service] Plugin "securitySolutionServerless" is disabled.
[2024-03-13T15:05:58.023+08:00][INFO ][plugins-service] Plugin "serverless" is disabled.
[2024-03-13T15:05:58.024+08:00][INFO ][plugins-service] Plugin "serverlessObservability" is disabled.
[2024-03-13T15:05:58.024+08:00][INFO ][plugins-service] Plugin "serverlessSearch" is disabled.
[2024-03-13T15:05:58.998+08:00][INFO ][http.server.Preboot] http server running at http://0.0.0.0:5601
[2024-03-13T15:05:59.279+08:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]
[2024-03-13T15:05:59.318+08:00][INFO ][preboot] "interactiveSetup" plugin is holding setup: Validating Elasticsearch connection configuration…
[2024-03-13T15:05:59.389+08:00][INFO ][root] Holding setup until preboot stage is completed.


i Kibana has not been configured.

Go to http://0.0.0.0:5601/?code=814117 to get started.

十、访问kibana

打开浏览器,访问 http://192.168.1.25:5601/?code=814117,需要输入elastic启动时生成的token

ℹ️ Configure Kibana to use this cluster:
• Run Kibana and click the configuration link in the terminal when Kibana starts.
• Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
eyJ2ZXIiOiI4LjEyLjIiLCJhZHIiOlsiMTcyLjE3LjAuMTo5MjAwIl0sImZnciI6IjNiZjE5OGYzYmVlMDhkYzhlNDMyMmRlZTAzMzkxZGEyYzRmNTk5ZTAzNDgwMDIyN2RjMjRhNTIwNzY2NTkwOWYiLCJrZXkiOiJqMnlGTm80QlFaV21wZHN0ckRxUzpDWE8tU0ZQSlRCQ1YwMkt1MU5RV01BIn0=

就这一段,如果提示token过期,可以通过./elasticsearch-create-enrollment-token -s kibana命令,重新生成token

 此处输入elastic启动时的用户密码:elastic/YL-y61L+E3T4OnJT95L8

问题:

1.Kibana8.2.0连接ElasticSearch8.2.0的enrollment token过期

[es@node3 bin]$ ./elasticsearch-create-enrollment-token -s kibana
warning: ignoring JAVA_HOME=/usr/java/jdk1.8.0_144/; using bundled JDK
eyJ2ZXIiOiI4LjEyLjIiLCJhZHIiOlsiMTcyLjE3LjAuMTo5MjAwIl0sImZnciI6IjNiZjE5OGYzYmVlMDhkYzhlNDMyMmRlZTAzMzkxZGEyYzRmNTk5ZTAzNDgwMDIyN2RjMjRhNTIwNzY2NTkwOWYiLCJrZXkiOiJrR3lsTm80QlFaV21wZHN0cGpyazo3cVRTbzdsWlFTQ2hlNDdwdTBGMHpnIn0=
[es@node3 bin]$

 

标签:03,05,Kibana8.12,kibana,2024,centos7.9,source,ES8.12,start
From: https://www.cnblogs.com/sheepships/p/18070745

相关文章

  • linux系统centos7.9如何安装nginx
    1、官网下载nginxnginx官网:https://nginx.org/选择稳定版进行下载,也可以下载老版本,下载成功后上传到服务器。2、使用wget下载访问nginx官网,在下载页面鼠标右击复制链接地址。登录服务器使用wget命令下载:wgethttps://nginx.org/download/nginx-1.24.0.tar.gz3、解压文件t......
  • CentOS7.9升级OpenSSH到9.6p1
    mkdir/softwarecd/softwarewgethttps://www.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gzwget--no-check-certificatehttps://www.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gzyuminstall-ygccgcc-c++glibcmakeautomakeautoconfzlibzlib-d......
  • centos7.9 无法远程登录报Permission denied, please try again 错误
    最近因高危漏洞对openssh的版本升级到OpenSSH_9.4p1,OpenSSL1.1.1k 25Mar2021 有台机器无法远程连接,报如下错误: 有点奇怪,openssh同时升级了两台机器  ,另外一台都可以最开始怀疑是PermitRootLoginyes注释掉的原因,打开注释还是无法登录反正各种折腾,最后修改如下......
  • 记一次centos7.9崩溃恢复操作(limits.conf配置失误),救援模式
    引起故障的原因:调整了操作系统的内核参数文件limits.conf,* softnproc131072* hardnproc131072* softnofile65536* hardnofile131072 以上的参数都扩大了10倍,ssh登录主机就开始异常了,连上去后就直接断开了,表象就是无法新建ssh会话连接,当前的用户有sudo免密操......
  • centos7.9(大部分都可以)和redhat6.9 离线升级OpenSSH和openssl (2023年的版本)
     ssl 红色。测试centos7.6也可以升级注意事项!1、多开几个连接窗口(xshell),避免升级openssh失败无法再次连接终端,否则要跑机房了。2、可开启telnet服务、vnc服务、打快照。多几个“保命”的路数。一、centos7.9的信息[root@node2~]#opensslversionOpenSSL1.0.2k-fips......
  • centos7.9内核升级至6.1.12-1
    载入公钥rpm--importhttps://www.elrepo.org/RPM-GPG-KEY-elrepo.org升级安装ELReporpm-Uvhhttps://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm载入elrepo-kernel元数据yum--disablerepo=*--enablerepo=elrepo-kernelrepolist查看可用的rpm包yum-......
  • 超算集群安装OpenFOAM-LIGGGHTS-CFDEM(普通用户权限-以CSU HPC CentOS7.9为例)
    普通用户权限超算集群安装OpenFOAM-LIGGGHTS-CFDEM,由于缺少root权限,无法根据CFDEM官方instruction进行安装。本文以CSU超算平台为例,利用普通用户权限进行编译安装。文章修正了已有教程中部分问题,特别感谢希望先生与记得小蘋初见教程。1.安装必要依赖包此部分在记得小蘋初见中......
  • centos7.9 编译安装redis 6.2.6
    参考地址:https://zhudo.net/server/linux/149.html 1.下载和安装下载redis需要其他版本去官网自行下载wget-chttps://download.redis.io/releases/redis-6.2.6.tar.gz//解压tar-zvxfredis-6.2.6.tar.gz//把安装包移动到安装目录,并且重命名为redismvredis-6.2.6......
  • centos7.9 编译安装cmake 3.23.0
     参考地址:https://www.zhudo.net/server/linux/125.html1、先检查并卸载老版本yumremovecmake2、准备安装好cmake所需的依赖yum-yinstallgccgcc-c++opensslopenssl-develtar3、下载源码官方地址:https://github.com/Kitware/CMake/releases/download/v3.23.0/......
  • centos7.9升级内核
    注意安装内核kernel5.4.261版本会与ssh9.4和9.5版本冲突,导致重启之后ssh链接不了1.查看现在的内核uname-r3.10.0-1160.el7.x86_642.下载rpm内核,离线安装下载页面 https://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/rpm-ivh kernel-lt-5.4.242-......