单机6.4.2搭建过程:
- 下载地址
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.2.tar.gz
- 步骤
1. [root@S1MA11 es]# tar -zxvf elasticsearch-6.4.2.tar.gz
2. [root@S1MA11 bin]# adduser es
[root@S1MA11 bin]# passwd es
[root@S1MA11 bin]# chown -R es:es /home/guoyu/es/elasticsearch-6.4.2/
3.
不要使用 [root@S1MA11 ~]# sudo su es
使用 [root@S1MA11 ~]# su es
4. 启动es [es@S1MA11 elasticsearch-6.4.2]$ ./bin/elasticsearch
日志:
[2019-04-26T16:00:43,026][INFO ][o.e.n.Node ] [] initializing ...
[2019-04-26T16:00:43,162][INFO ][o.e.e.NodeEnvironment ] [8kA_SKP] using [1] data paths, mounts [[/home (/dev/mapper/centos-home)]], net usable_space [17.4tb], net total_space [18tb], types [xfs]
[2019-04-26T16:00:43,163][INFO ][o.e.e.NodeEnvironment ] [8kA_SKP] heap size [989.8mb], compressed ordinary object pointers [true]
[2019-04-26T16:00:43,164][INFO ][o.e.n.Node ] [8kA_SKP] node name derived from node ID [8kA_SKPbQGGto5mA0xq0kQ]; set [node.name] to override
[2019-04-26T16:00:43,165][INFO ][o.e.n.Node ] [8kA_SKP] version[6.4.2], pid[20743], build[default/tar/04711c2/2018-09-26T13:34:09.098244Z], OS[Linux/3.10.0-229.el7.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_77/25.77-b03]
[2019-04-26T16:00:43,165][INFO ][o.e.n.Node ] [8kA_SKP] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.qKMY4PbH, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path.home=/home/guoyu/es/elasticsearch-6.4.2, -Des.path.conf=/home/guoyu/es/elasticsearch-6.4.2/config, -Des.distribution.flavor=default, -Des.distribution.type=tar]
[2019-04-26T16:00:45,530][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [aggs-matrix-stats]
[2019-04-26T16:00:45,530][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [analysis-common]
[2019-04-26T16:00:45,530][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [ingest-common]
[2019-04-26T16:00:45,531][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [lang-expression]
[2019-04-26T16:00:45,531][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [lang-mustache]
[2019-04-26T16:00:45,531][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [lang-painless]
[2019-04-26T16:00:45,531][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [mapper-extras]
[2019-04-26T16:00:45,531][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [parent-join]
[2019-04-26T16:00:45,531][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [percolator]
[2019-04-26T16:00:45,531][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [rank-eval]
[2019-04-26T16:00:45,532][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [reindex]
[2019-04-26T16:00:45,532][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [repository-url]
[2019-04-26T16:00:45,532][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [transport-netty4]
[2019-04-26T16:00:45,532][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [tribe]
[2019-04-26T16:00:45,532][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-core]
[2019-04-26T16:00:45,532][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-deprecation]
[2019-04-26T16:00:45,532][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-graph]
[2019-04-26T16:00:45,533][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-logstash]
[2019-04-26T16:00:45,533][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-ml]
[2019-04-26T16:00:45,533][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-monitoring]
[2019-04-26T16:00:45,533][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-rollup]
[2019-04-26T16:00:45,533][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-security]
[2019-04-26T16:00:45,533][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-sql]
[2019-04-26T16:00:45,533][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-upgrade]
[2019-04-26T16:00:45,533][INFO ][o.e.p.PluginsService ] [8kA_SKP] loaded module [x-pack-watcher]
[2019-04-26T16:00:45,534][INFO ][o.e.p.PluginsService ] [8kA_SKP] no plugins loaded
[2019-04-26T16:00:50,003][INFO ][o.e.x.s.a.s.FileRolesStore] [8kA_SKP] parsed [0] roles from file [/home/guoyu/es/elasticsearch-6.4.2/config/roles.yml]
[2019-04-26T16:00:50,584][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/21025] [Main.cc@109] controller (64 bit): Version 6.4.2 (Build 660eefe6f2ea55) Copyright (c) 2018 Elasticsearch BV
[2019-04-26T16:00:51,111][DEBUG][o.e.a.ActionModule ] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-04-26T16:00:51,373][INFO ][o.e.d.DiscoveryModule ] [8kA_SKP] using discovery type [zen]
[2019-04-26T16:00:52,340][INFO ][o.e.n.Node ] [8kA_SKP] initialized
[2019-04-26T16:00:52,340][INFO ][o.e.n.Node ] [8kA_SKP] starting ...
[2019-04-26T16:00:52,561][INFO ][o.e.t.TransportService ] [8kA_SKP] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2019-04-26T16:00:52,579][WARN ][o.e.b.BootstrapChecks ] [8kA_SKP] max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
[2019-04-26T16:00:52,579][WARN ][o.e.b.BootstrapChecks ] [8kA_SKP] max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2019-04-26T16:00:55,639][INFO ][o.e.c.s.MasterService ] [8kA_SKP] zen-disco-elected-as-master ([0] nodes joined)[, ], reason: new_master {8kA_SKP}{8kA_SKPbQGGto5mA0xq0kQ}{zATW-WLvRr2NXhF5QyVbCA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=67357773824, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}
[2019-04-26T16:00:55,647][INFO ][o.e.c.s.ClusterApplierService] [8kA_SKP] new_master {8kA_SKP}{8kA_SKPbQGGto5mA0xq0kQ}{zATW-WLvRr2NXhF5QyVbCA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=67357773824, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}, reason: apply cluster state (from master [master {8kA_SKP}{8kA_SKPbQGGto5mA0xq0kQ}{zATW-WLvRr2NXhF5QyVbCA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=67357773824, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)[, ]]])
[2019-04-26T16:00:55,675][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [8kA_SKP] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}
[2019-04-26T16:00:55,676][INFO ][o.e.n.Node ] [8kA_SKP] started
[2019-04-26T16:00:55,690][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [8kA_SKP] Failed to clear cache for realms [[]]
[2019-04-26T16:00:55,746][INFO ][o.e.g.GatewayService ] [8kA_SKP] recovered [0] indices into cluster_state
[2019-04-26T16:00:55,971][INFO ][o.e.c.m.MetaDataIndexTemplateService] [8kA_SKP] adding template [.triggered_watches] for index patterns [.triggered_watches*]
[2019-04-26T16:00:56,056][INFO ][o.e.c.m.MetaDataIndexTemplateService] [8kA_SKP] adding template [.watch-history-9] for index patterns [.watcher-history-9*]
[2019-04-26T16:00:56,082][INFO ][o.e.c.m.MetaDataIndexTemplateService] [8kA_SKP] adding template [.watches] for index patterns [.watches*]
[2019-04-26T16:00:56,115][INFO ][o.e.c.m.MetaDataIndexTemplateService] [8kA_SKP] adding template [.monitoring-logstash] for index patterns [.monitoring-logstash-6-*]
[2019-04-26T16:00:56,157][INFO ][o.e.c.m.MetaDataIndexTemplateService] [8kA_SKP] adding template [.monitoring-es] for index patterns [.monitoring-es-6-*]
[2019-04-26T16:00:56,190][INFO ][o.e.c.m.MetaDataIndexTemplateService] [8kA_SKP] adding template [.monitoring-beats] for index patterns [.monitoring-beats-6-*]
[2019-04-26T16:00:56,231][INFO ][o.e.c.m.MetaDataIndexTemplateService] [8kA_SKP] adding template [.monitoring-alerts] for index patterns [.monitoring-alerts-6]
[2019-04-26T16:00:56,267][INFO ][o.e.c.m.MetaDataIndexTemplateService] [8kA_SKP] adding template [.monitoring-kibana] for index patterns [.monitoring-kibana-6-*]
[2019-04-26T16:00:56,455][INFO ][o.e.l.LicenseService ] [8kA_SKP] license [10716c1f-f6ad-4fd0-945a-02ab998f65a3] mode [basic] - valid
5.[root@S1MA11 ~]# curl http://localhost:9200/?pretty
{
"name" : "8kA_SKP",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "PDawqKqIR26GtILEl7HW9g",
"version" : {
"number" : "6.4.2",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "04711c2",
"build_date" : "2018-09-26T13:34:09.098244Z",
"build_snapshot" : false,
"lucene_version" : "7.4.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
至此安装成功