Centos7基于Docker搭建EK(elasticsearch和kibana)

1.docker安装和启动

wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
yum install docker-ce -y
systemctl start docker

systemctl enable docker
systemctl status docker

2.配置镜像加速器

针对Docker客户端版本大于 1.10.0 的用户
您可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://780urbjd.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

3.下载镜像

docker pull elasticsearch:latest
docker pull kibana:latest
docker pull logstash:latest

Centos7基于Docker搭建EK(elasticsearch和kibana)
4.启动容器elasticsearch和kibana

docker run --name elasticsearch \
-v "$PWD/esdata":/usr/share/elasticsearch/data \
-p 9200:9200 \
-d elasticsearch

验证容器(网页访问公网ip+9200)
Centos7基于Docker搭建EK(elasticsearch和kibana)

docker run --name kibana \
--link elasticsearch:elasticsearch \
-p 5601:5601 \
-d kibana

验证容器(网页访问公网ip+5601)
Centos7基于Docker搭建EK(elasticsearch和kibana)

上一篇:Win7 无法进行Windows自动更新


下一篇:Centos7编译安装python3.7和pip3