elasticsearch-7.0.1 支持 JDK1.8
[root@localhost local]# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.0.1-linux-x86_64.tar.gz mv elasticsearch-7.0.1 elasticsearch 授权给用户admin chown -R admin /usr/local/elasticsearchjvm.options
Elasticsearch默认会配置1G的JVM堆的初始值和最大值,该jvm参数被配置在/config/jvm.options里:
-Xms1g
-Xmx1g
先把参数改小些,比如:
-Xms215m
-Xmx215m
cd /usr/local/elasticsearch/
./bin/elasticsearch -d
[admin@localhost bin]$ curl -i http://localhost:9200
HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 513
{
"name" : "localhost.localdomain",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "8d2EealXQxy38ii32NX86Q",
"version" : {
"number" : "7.0.1",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "e4efcb5",
"build_date" : "2019-04-29T12:56:03.145736Z",
"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"
}



