How to run Elasticsearch 2.1.1 as root user in Linux machine

前端 未结 6 924
北恋
北恋 2020-12-29 23:55

I am trying to run Elasticsearch 2.1.1 in my Linux machine which I am the root user of it.

When I tried to execute the Elasticsearch.I am getting the following error

6条回答
  •  难免孤独
    2020-12-30 00:42

    There are two workarounds to resolve this issue :

    Solution 1: download zip file n unzip then start by following command

    bin/elasticsearch -Des.insecure.allow.root=true -d
    

    Solution 2:

    vi bin/elasticsearch
    

    Add property to allow root to run two instance:

    ES_JAVA_OPTS="-Des.insecure.allow.root=true"
    

    Save and close. You can start by root now.

提交回复
热议问题