Docker安装elasticsearch 7.7.0

1、pull 镜像

docker pull docker.elastic.co/elasticsearch/elasticsearch:7.7.0

2、运行elasticsearch

docker run --name=elastic770 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --network=network_172_19 --ip=172.19.0.101 -v /var/docker/elastic/data:/data docker.elastic.co/elasticsearch/elasticsearch:7.7.0

注意测试环境加上-e "discovery.type=single-node"

3、安装ik分词插件

docker exec -it elastic770 /bin/bash

./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.7.0/elasticsearch-analysis-ik-7.7.0.zip

4、其他配置

docker exec -it elastic770 /bin/bash

yum update

yum install vim

vim /config/elasticsearch.yml

修改elasticsearch.yml

cluster.name: "elasticsearchSZGHJ"

network.host: 0.0.0.0

node.name: node0

http.host: 0.0.0.0

http.cors.enabled: true

http.cors.allow-origin: "*"

5、安装可视化管理工具

docker run -p 9800:9800 -d --network=network_172_19 --link elastic770:hd containerize/elastichd

在浏览器打开http://localhost:9800

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值