docker环境下日志监控安装
环境准备:
sed -i ‘s/^SELINUX=.*/SELINUX=disabled/g’ /etc/selinux/config
systemctl stop firewall
systemctl disable firewall
安装docker-ce
1、安装mongo数据库:
docker run -d --name graylog-mongo
–privileged=true
-v /etc/localtime:/etc/localtime
-v /graylog/data/mongo:/data/db
mongo:3
容器数据挂载目录:
/graylog/data/mongo
2、安装Elasticsearch
docker run -d --name graylog-elasticsearch
-p 9200:9200
-p 9300:9300
-v /etc/localtime:/etc/localtime
–privileged=true
-v /graylog/data/elasticsearch:/usr/share/elasticsearch/data
elasticsearch:2
elasticsearch -Des.cluster.name=“graylog”
容器数据挂载目录:
/graylog/data/elasticsearch
3、Graylog
docker run -d --name graylog2
–link graylog-mongo:mongo
–link