首页 > 系统相关 >CentOS7 Docker安装 ElasticSearch8、Kibana8

CentOS7 Docker安装 ElasticSearch8、Kibana8

时间:2023-03-30 18:45:40浏览次数:36  
标签:elastic -- Kibana ElasticSearch8 CentOS7 token elasticsearch docker Docker

一、Docker安装

yum install -y docker
#开机自启
systemctl enable docker
#启动 docker
systemctl start docker

二、安装 ElasticSearch

docker pull docker.elastic.co/elasticsearch/elasticsearch:8.6.2
vi /etc/sysctl.conf
在/etc/sysctl.conf文件最后添加一行
vm.max_map_count=262144
docker network create elastic
docker run --name es01 --net elastic -p 9200:9200 -it docker.elastic.co/elasticsearch/elasticsearch:8.6.2
#运行成功后,会出现:
✅ 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`):
  fahCf24pIcF6ytXOY95=

ℹ️  HTTP CA certificate SHA-256 fingerprint:
  860a07d87cd669c5e83fd1228c8dbdc35afe40802f80661d7990770bf93e58b1

ℹ️  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):
  eyJ2ZXIiOiI4LjYuMiIsImFkciI6WyIxNzIuMTguMC4yOjkyMDAiXSwiZmdyIjoiODYwYTA3ZDg3Y2Q2NjljNWU4M2ZkMTIyOGM4ZGJkYzM1YWZlNDA4MDJmODA2NjFkNzk5MDc3MGJmOTNlNThiMSIsImtleSI6Ii1VMy1NWWNCZUxJWDZldDJ0bW5BOmozbzQ2ejJrUjFpaERfSEExS1BNdEEifQ==

ℹ️ 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):
  eyJ2ZXIiOiI4LjYuMiIsImFkciI6WyIxNzIuMTguMC4yOjkyMDAiXSwiZmdyIjoiODYwYTA3ZDg3Y2Q2NjljNWU4M2ZkMTIyOGM4ZGJkYzM1YWZlNDA4MDJmODA2NjFkNzk5MDc3MGJmOTNlNThiMSIsImtleSI6Ii0wMy1NWWNCZUxJWDZldDJ0MmsyOlF1TVktVWhVVHE2T1lhcFZLSnZ2SFEifQ==

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

三、安装 Kibana

docker pull docker.elastic.co/kibana/kibana:8.6.2
docker run --name kib01 --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:8.6.2
#运行成功后,会让你访问:
Go to http://0.0.0.0:5601/?code=989981 to get started.
0.0.0.0 替换成你服务器的地址
然后将上一步生成的的Kibana token 输入,最后输入用户名elastic,生成的密码,即可访问

四、其他配置

#如果想要自定义 ElasticSearch 密码:
docker exec -it es01 /bin/bash
elasticsearch-reset-password -u elastic -i

五、如果你要访问ES,需要使用 https 协议

如果你直接用地址比如:110.212.33.123:9200,是没法访问的,需要带上 https://110.212.33.123:9200。

六、记得安全组开放端口、防火墙开放端口

标签:elastic,--,Kibana,ElasticSearch8,CentOS7,token,elasticsearch,docker,Docker
From: https://www.cnblogs.com/M-Anonymous/p/17273969.html

相关文章

  • docker启动失败后怎么查看日志
    方法一:dockerlogs--since30mcontainer#查看30分钟日志,容器成功失败都可以查看,container表示容器名称或ID方法二:dockerinspect--format'{{.LogPath}}'container#查询容器日志文件目录vi/var/lib/docker/containers/5338f536922596e5503e8715e0a9d5de9f14436177......
  • 修改docker目录
    1)、停掉docker服务[root@localhost~]#systemctlstopdocker2)、修改配置文件[root@localhost~]#mkdir/data[root@localhost~]#vim/usr/lib/systemd/system/docker.service#找到ExecStart=/usr/bin/dockerd部分所在的行,行尾增加参数--data-rootExecStart=/usr/bin/docke......
  • 玩转RuoYi-Cloud-Plus--7.docker部署nacos(单机)
    7.docker部署nacos(单机)仅部署nacos-server,不使用prometheus/grafana等监控组件 1.拉取镜像dockerpullnacos/nacos-serverdockerpullna......
  • crictl和ctr与docker的命令的对比
    containerd相比于docker,多了namespace概念,每个image和container都会在各自的namespace下可见,目前k8s会使用k8s.io作为命名空间crictl使用命名空间k8s.iocric......
  • docker-compose 安装 LDAP+phpLDAPadmin
    docker-compose安装LDAP+phpLDAPadmin1、docker-compose.ymlversion:'2'services:#ldap服务openldap:image:osixia/openldapcontainer_name:op......
  • Docker常用命令
    Docker命令组成用制定环境运行命令dockerrunubuntu:15.10/bin/echo"Helloworld"#docker:Docker的二进制执行文件。#run:与前面的docker组合来运行一个容器......
  • docker搭建GBase 8A
    一定在docker环境下部署第一步:选择执行:dockersearchgbase8a  第二步:拉取镜像:dockerpullshihd/gbase8a:1.0  第三步:启动镜像:dockerrun-it--namegbase......
  • docker中的报错:Error: Failed to download metadata for repo ‘appstream‘: Cannot
    在学习使用docker技术过程中,基于centos镜像自定义新的镜像,其中基础镜像centos需要提前安装好 vim 和net-tools,然而在刚开始通过 yum-yinstallvim 安装vim......
  • cAdvisor+Pro+Grafana 监控Docker容器
    cAdvisor(ContainerAdvisor) Google 开源的一个容器监控工具,可用于对容器资源的使用情况和性能进行监控。用于收集、聚合、处理和导出正在运行容器的有关信息。具体来......
  • docker常用命令
    基本命令❖查看版本信息:dockerversion❖查看系统信息:dockerinfo镜像管理❖查看所有镜像:dockerimages❖搜索镜像:dockersearchnginx❖拉取下载:dockerpullngin......