前言:安装这个东西比较吃网速,建议在网络好的地方下载
1,安装docker-compose
curl -L "https://get.daocloud.io/docker/compose/releases/download/1.27.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2.添加可执行权限
chmod +x /usr/local/bin/docker-compose
3.在、/usr/local创建文件夹es
mkdir es
4.在es目录下创建docker-compose.yml
version: "3.1"
services:
elasticsearch:
image: daocloud.io/library/elasticsearch:6.5.4
restart: always
container_name: elasticsearch
ports:
- 9200:9200
kibana:
image: daocloud.io/library/kibana:6.5.4
restart: always
container_name: kibana
ports:
- 5601:5601
environment:
- elasticsearch_url=http://本机ip:9200
depends_on:
- elasticsearch
5.下面对宿主机进行信息的更改
vim /etc/sysctl.conf 添加
vm.max_map_count=655360
保存
执行如下命令让他生效
sysctl -p
6.到es下面启动
docker-compose up
//可能会安装很多kibana插件(第一次装)