创建数据存储目录,给于777权限
[root@localhost ELK]# pwd
/data/ELK
[root@localhost ELK]# tree -L 3
.
├── ElasticSearch
│ ├── config
│ │ └── elasticsearch.yml
│ ├── data
│ │ └── nodes
│ └── plugins
└── kibana
└── kibana.yml
说明:
开发服务器 | 组件 | URL |
---|---|---|
192.168.0.18 | elasticsearch | http://192.168.0.18:9200/ |
192.168.0.18 | kibana | http://192.168.0.18:5601/ |
192.168.0.18 | head | http://192.168.0.18:9100/ |
192.168.0.18 | cerebro | http://192.168.0.18:9000/ |
创建配置文件elasticsearch.yml
[root@localhost config]# vim elasticsearch.yml
http.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
创建配置文件kibana.yml
[root@localhost kibana]# vim kibana.yml
server.name: kibana
server.host: "0"
elasticsearch.hosts: [ "http://192.168.0.18:9200" ]
xpack.monitoring.ui.container.elasticsearch.enabled: true
docker-compose文件位置
[root@localhost es7]# pwd
/app/es7
[root@localhost es7]# tree
.
└── docker-compose.yml
docker-compose.yml文件内容