es安装配置

编程

1、解压:tar -xvf elasticsearch-8.0.0-linux-x86_64.tar.gz 

cd elasticsearch

2、./bin/elasticsearch

 

3、集群节点设置:

./elasticsearch -Epath.data=data2 -Epath.logs=log2

./elasticsearch -Epath.data=data3 -Epath.logs=log3

4、状态API

GET /_cat/health?v

5、cmd URL

curl -X<VERB> "<PROTOCOL>://<HOST>:<PORT>/<PATH>?<QUERY_STRING>" -d "<BODY>"

curl -XPOST "http://127.0.0.1:9200/solar_website/_search?name=fist" -d "{ “query”:{ "term":{"user":"chenli"} }  }"

例子:

<VERB>

The appropriate HTTP method or verb. For example, GET, POST, PUT, HEAD, or DELETE.

<PROTOCOL>

Either http or https. Use the latter if you have an HTTPS proxy in front of Elasticsearch or you use Elasticsearch security features to encrypt HTTP communications.

<HOST>

The hostname of any node in your Elasticsearch cluster. Alternatively, use localhost for a node on your local machine.

<PORT>

The port running the Elasticsearch HTTP service, which defaults to 9200.

<PATH>

The API endpoint, which can contain multiple components, such as _cluster/stats or _nodes/stats/jvm.

<QUERY_STRING>

Any optional query-string parameters. For example, ?pretty will pretty-print the JSON response to make it easier to read.

<BODY>

A JSON-encoded request body (if necessary).

 

 

以上是 es安装配置 的全部内容, 来源链接: utcz.com/z/515539.html

回到顶部