Docker安装ElasticSearch 7

配置参数:

sysctl -w vm.max_map_count=262144 &&
grep vm.max_map_count /etc/sysctl.conf

下载镜像:

docker pull elasticsearch:7.0.0

启动容器:

docker run --name elasticsearch -d \
-v /home/elk/elasticsearch/data:/usr/share/elasticsearch/data \
-p 9200:9200 \
-p 9300:9300 \
-e "discovery.type=single-node" \
elasticsearch:7.0.0

开启防火墙端口:

firewall-cmd --permanent --add-port=9200/tcp && \
firewall-cmd --permanent --add-port=9300/tcp && \
firewall-cmd --reload

以http访问宿主机9200端口,得到下面输出,则启动成功:

{

    "name": "0a50cb561c04",
    "cluster_name": "docker-cluster",
    "cluster_uuid": "DFu_C31fQwqhzLyTko6wGg",
    "version": {
        "number": "7.0.0",
        "build_flavor": "default",
        "build_type": "docker",
        "build_hash": "b7e28a7",
        "build_date": "2019-04-05T22:55:32.697037Z",
        "build_snapshot": false,
        "lucene_version": "8.0.0",
        "minimum_wire_compatibility_version": "6.7.0",
        "minimum_index_compatibility_version": "6.0.0-beta1"
    },
    "tagline": "You Know, for Search"

}

 

©️2020 CSDN 皮肤主题: 程序猿惹谁了 设计师:上身试试 返回首页