Elasticsearc 安装并运行

安装 Elasticsearch 之前,你需要先安装一个较新的版本的 Java。

如何启动:

cd  D:\ELK\elasticsearch-6.5.4\bin
双击  elasticsearch.bat

浏览器访问:http://localhost:9200/
结果如下:

{
	name: "qlhVnv-", //这个是节点的名字
	cluster_name: "elasticsearch",//这个是集群的名字
	cluster_uuid: "64ecB72GRrCYHf4qH2pDBA",//集群的uuid
	version: { //版本信息
	number: "6.5.4", //版本号为6.5.4
	build_flavor: "default",
	build_type: "zip",
	build_hash: "d2ef93d",
	build_date: "2018-12-17T21:17:40.758843Z",
	build_snapshot: false,
	lucene_version: "7.5.0",//lucene 的版本
	minimum_wire_compatibility_version: "5.6.0",
	minimum_index_compatibility_version: "5.0.0"
	},
	tagline: "You Know, for Search"
}

修改集群的名字和节点的名字启动:

elasticsearch.bat -Ecluster.name=my_cluster_name -Enode.name=my_node_name

启动日志:

[2019-01-15T10:35:45,301][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [aggs-matrix-stats]
[2019-01-15T10:35:45,309][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [analysis-common]
[2019-01-15T10:35:45,309][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [ingest-common]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [lang-expression]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [lang-mustache]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [lang-painless]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [mapper-extras]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [parent-join]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [percolator]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [rank-eval]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [reindex]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [repository-url]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [transport-netty4]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [tribe]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-ccr]
[2019-01-15T10:35:45,311][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-core]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-deprecation]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-graph]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-logstash]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-ml]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-monitoring]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-rollup]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-security]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-sql]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-upgrade]
[2019-01-15T10:35:45,321][INFO ][o.e.p.PluginsService     ] [my_node_name] loaded module [x-pack-watcher]
[2019-01-15T10:35:45,329][INFO ][o.e.p.PluginsService     ] [my_node_name] no plugins loaded
[2019-01-15T10:35:48,216][INFO ][o.e.x.s.a.s.FileRolesStore] [my_node_name] parsed [0] roles from file [D:\ELK\elasticsearch-6.5.4\config\roles.yml]
[2019-01-15T10:35:48,728][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [my_node_name] [controller/17772] [Main.cc@109] controller (64 bit): Version 6.5.4 (Build b616085ef32393) Copyright (c) 2018 Elasticsearch BV
[2019-01-15T10:35:49,040][DEBUG][o.e.a.ActionModule       ] [my_node_name] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-01-15T10:35:49,201][INFO ][o.e.d.DiscoveryModule    ] [my_node_name] using discovery type [zen] and host providers [settings]
[2019-01-15T10:35:49,776][INFO ][o.e.n.Node               ] [my_node_name] initialized
[2019-01-15T10:35:49,776][INFO ][o.e.n.Node               ] [my_node_name] starting ...
[2019-01-15T10:35:50,393][INFO ][o.e.t.TransportService   ] [my_node_name] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
[2019-01-15T10:35:53,478][INFO ][o.e.c.s.MasterService    ] [my_node_name] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {my_node_name}{qlhVnv-uQS2ccJD7sY_Idg}{l7F02XT4Rdix28Nve8sbNw}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=8436658176, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}
[2019-01-15T10:35:53,494][INFO ][o.e.c.s.ClusterApplierService] [my_node_name] new_master {my_node_name}{qlhVnv-uQS2ccJD7sY_Idg}{l7F02XT4Rdix28Nve8sbNw}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=8436658176, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}, reason: apply cluster state (from master [master {my_node_name}{qlhVnv-uQS2ccJD7sY_Idg}{l7F02XT4Rdix28Nve8sbNw}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=8436658176, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
[2019-01-15T10:35:53,881][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [my_node_name] Failed to clear cache for realms [[]]
[2019-01-15T10:35:53,902][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [my_node_name] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
[2019-01-15T10:35:53,902][INFO ][o.e.n.Node               ] [my_node_name] started

浏览器访问:http://localhost:9200/
结果如下:

{
	name: "my_node_name",
	cluster_name: "my_cluster_name",
	cluster_uuid: "64ecB72GRrCYHf4qH2pDBA",
	version: {
	number: "6.5.4",
	build_flavor: "default",
	build_type: "zip",
	build_hash: "d2ef93d",
	build_date: "2018-12-17T21:17:40.758843Z",
	build_snapshot: false,
	lucene_version: "7.5.0",
	minimum_wire_compatibility_version: "5.6.0",
	minimum_index_compatibility_version: "5.0.0"
	},
	tagline: "You Know, for Search"
}

你可能感兴趣的:(Elasticsearch)