标签:必须 chm 图片 dir 查看 安装 oca xms info
[root@localhost ~]# docker pull elasticsearch:7.8.0 安装elasticsearch:7.8.0
[root@localhost ~]# docker pull kibana:7.8.0 安装安装elasticsearch:7.8.0版本对应的可视化工具
创建文档
[root@localhost ~]# mkdir -p /mydata/elasticsearch/data
[root@localhost ~]# mkdir -p /mydata/elasticsearch/config
进入mydata/elasticsearch/config下,这里的host后面必须要有空格,因为是yml文件,否则无法识别
[root@localhost config]# echo "http.host: 0.0.0.0">>/mydata/elasticsearch/config/elasticsearch.yml
进行挂载
[root@localhost config]# docker run --name elasticsearch -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms64m -Xmx128m" \
-v /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \
-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-d elasticsearch:7.8.0
进入elasticsearch目录,开放/mydata/elasticsearch/权限
[root@localhost elasticsearch]# chmod -R 777 /mydata/elasticsearch/
查看id号后启动:
[root@localhost elasticsearch]# docker ps -a
[root@localhost elasticsearch]# docker start e19
成功界面:
谷粒商城微服务分布式高级篇:linux下使用docker安装ElasticSearch
标签:必须 chm 图片 dir 查看 安装 oca xms info
原文地址:https://www.cnblogs.com/linchenguang/p/13172026.html