docker搭建ELK日志采集系统(二)
参考:https://zhuanlan.zhihu.com/p/107346014?from_voters_page=true
环境:
服务器 | 系统 | IP | 掩码 |
elk | centos 7 | 10.99.101.232 | 255.255.255.0 |
二、docker安装kibana
docker pull kibana:7.6.0 mkdir /home/elk/kibanaconfig chmod +777 /home/elk/kibanaconfig vi /home/elk/kibanaconfig/kibana.yml server.port: 5601 server.host: "0.0.0.0" elasticsearch.hosts: ["http://10.99.101.232:9200"] # 操作界面语言设置 i18n.locale: "zh-CN" chmod +777 /home/elk/kibanaconfig/kibana.yml docker run -di --name kibana -p 5601:5601 -v /home/elk/kibanaconfig/:/usr/share/kibana/config --privileged=true kibana:7.6.0 docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ae14d45c1a94 kibana:7.6.0 "/usr/local/bin/du..." 15 minutes ago Up 15 minutes 0.0.0.0:5601->5601/tcp kibana cac0c775dffe elasticsearch:7.6.0 "/usr/local/bin/do..." About an hour ago Up 39 minutes 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp elasticsearch docker update --restart=always ae14d45c1a94 firewall-cmd --add-port=5601/tcp --permanent firewall-cmd --reload
正常访问