Elasticsearch单机快速搭建

单机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"
}

至此安装成功

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,117评论 4 360
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 66,963评论 1 290
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 107,897评论 0 240
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,805评论 0 203
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,208评论 3 286
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,535评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,797评论 2 311
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,493评论 0 197
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,215评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,477评论 2 244
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 31,988评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,325评论 2 252
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 32,971评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,055评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,807评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,544评论 2 271
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,455评论 2 266

推荐阅读更多精彩内容