1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | [root@localhost bin]# ./elasticsearch -d [root@localhost bin]# Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root. at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93) at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) Refer to the log for complete error details. 创建elk用户:elk:x:500:500::/home/elk:/bin/bash 赋予权限: [root@localhost opt]# chown -R elk.elk elasticsearch-2.2.1 切换elk帐户: [root@localhost elasticsearch-2.2.1]# su elk 启动elasticsearch: [elk@localhost bin]$ ./elasticsearch -d 检查是否启动:[elk@localhost bin]$ curl -XGxt http://localhost:9200/ { "name" : "Iron Man", "cluster_name" : "elasticsearch", "version" : { "number" : "2.2.1", "build_hash" : "d045fc29d1932bce18b2e65ab8b297fbf6cd41a1", "build_timestamp" : "2016-03-09T09:38:54Z", "build_snapshot" : false, "lucene_version" : "5.4.1" }, "tagline" : "You Know, for Search" } |