热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

docker安装Elasticsearch+Kibana+密码配置+Kibana中文设置

安装Elasticsearch1、拉取镜像dockerpulldocker.elastic.coelasticsearchelasticsearch:7.10.02、构建容器&am

安装Elasticsearch

1、拉取镜像

docker pull docker.elastic.co/elasticsearch/elasticsearch:7.10.0

2、构建容器&运行

docker run --name es -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.10.0

3、修改配置

1、进入容器&打开文件
docker exec -it es bash
cd config
vi elasticsearch.yml
2、编辑文件
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
3、设置密码
cd bin
elasticsearch-setup-passwords interactive
// 输出
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]Y


Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [apm_system]:
Reenter password for [apm_system]:
Enter password for [kibana_system]:
Reenter password for [kibana_system]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Enter password for [remote_monitoring_user]:
Reenter password for [remote_monitoring_user]:
Changed password for user [apm_system]
Changed password for user [kibana_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]
4、退出&重启
exit
docker restart es

安装Kibana

1、拉去镜像

docker pull docker.elastic.co/kibana/kibana:7.10.0

2、构建容器&运行

YOUR_ELASTICSEARCH_CONTAINER_NAME_OR_ID:Elasticsearch容器的名字或容器ID

docker run --name kibana -d --link YOUR_ELASTICSEARCH_CONTAINER_NAME_OR_ID:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:7.10.0

3、修改配置

1、进入容器&打开文件
docker exec -it kibana bash
cd config
vi kibana.yml
2、编辑文件

IpAddress:docker inspect es查看es容器内部的ip地址

server.name: kibana
server.host: "0.0.0.0"
elasticsearch.hosts: [ "http://{IpAddress}:9200" ]
monitoring.ui.container.elasticsearch.enabled: true
elasticsearch.username: "elastic"
elasticsearch.password: "password"
i18n.locale: "zh-CN"
3、退出&重启
exit
docker restart kibana

Elasticsearch界面
docker安装Elasticsearch+Kibana+密码配置+Kibana中文设置

Kibana界面
docker安装Elasticsearch+Kibana+密码配置+Kibana中文设置


推荐阅读
author-avatar
xiashi
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有