谷粒商城微服务分布式高级篇:linux下使用docker安装ElasticSearch

yudiewenyuan 2020-06-21

[ ~]# docker pull elasticsearch:7.8.0  安装elasticsearch:7.8.0[ ~]# docker pull kibana:7.8.0 安装安装elasticsearch:7.8.0版本对应的可视化工具创建文档[ ~]# mkdir -p /mydata/elasticsearch/data [ ~]# mkdir -p /mydata/elasticsearch/config进入mydata/elasticsearch/config下,这里的host后面必须要有空格,因为是yml文件,否则无法识别[ config]# echo "http.host: 0.0.0.0">>/mydata/elasticsearch/config/elasticsearch.yml进行挂载[ 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/权限[ elasticsearch]# chmod -R 777 /mydata/elasticsearch/查看id号后启动:[ elasticsearch]# docker ps -a
谷粒商城微服务分布式高级篇:linux下使用docker安装ElasticSearch
[ elasticsearch]# docker start e19成功界面:
谷粒商城微服务分布式高级篇:linux下使用docker安装ElasticSearch

相关推荐