1. 程式人生 > >elasticsearch-安裝-1

elasticsearch-安裝-1

ots memory 地址 star 建議 groov jvm tar port

一.版本說明

  elasticsearch-5.6.0

  Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

  java version "1.8.0_144"
  Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
  Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

二.解壓安裝

  tar zvxf

elasticsearch-5.6.0.tar.gz

三.目錄結構

├── bin

├── config
│ └── scripts
├── data
│ └── nodes
│ └── 0
│ └── _state
├── lib
├── logs
├── modules
│ ├── aggs-matrix-stats
│ ├── ingest-common
│ ├── lang-expression
│ ├── lang-groovy
│ ├── lang-mustache
│ ├── lang-painless
│ ├── parent-join
│ ├── percolator
│ ├── reindex
│ ├── transport-netty3
│ └── transport-netty4
└── plugins

四.啟動服務

  ./bin/elasticsearch

[2017-09-16T02:12:39,550][INFO ][o.e.t.TransportService ] [7fXAbFa] publish_address {192.168.239.129:9300}, bound_addresses {[::]:9300}
[2017-09-16T02:12:39,602][INFO ][o.e.b.BootstrapChecks ] [7fXAbFa] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2017-09-16T02:12:45,330][WARN ][o.e.m.j.JvmGcMonitorService] [7fXAbFa] [gc][young][1][2] duration [4.5s], collections [1]/[5.6s], total [4.5s]/[5.8s], memory [266.2mb]->[43.1mb]/[1.9gb], all_pools {[young] [249.1mb]->[8.6mb]/[266.2mb]}{[survivor] [17mb]->[33.2mb]/[33.2mb]}{[old] [0b]->[7.2mb]/[1.6gb]}
[2017-09-16T02:12:45,415][WARN ][o.e.m.j.JvmGcMonitorService] [7fXAbFa] [gc][1] overhead, spent [4.5s] collecting in the last [5.6s]
[2017-09-16T02:12:53,399][INFO ][o.e.c.s.ClusterService ] [7fXAbFa] new_master {7fXAbFa}{7fXAbFa0Qw61rnNG1BfJIQ}{z9_mWtcORrGu42LUxAvp3g}{192.168.239.129}{192.168.239.129:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-09-16T02:12:53,941][INFO ][o.e.h.n.Netty4HttpServerTransport] [7fXAbFa] publish_address {192.168.239.129:9200}, bound_addresses {[::]:9200}
[2017-09-16T02:12:53,942][INFO ][o.e.n.Node ] [7fXAbFa] started


[2017-09-16T02:12:54,019][INFO ][o.e.g.GatewayService ] [7fXAbFa] recovered [0] indices into cluster_state

五.如何測試是否安裝成功

  瀏覽器輸入:ip地址:9200.

{
  "name" : "7fXAbFa",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "OX33WAUQSW6yLg_feAL2-g",
  "version" : {
    "number" : "5.6.0",
    "build_hash" : "781a835",
    "build_date" : "2017-09-07T03:09:58.087Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.0"
  },
  "tagline" : "You Know, for Search"
}
  看到以上內容,說明服務已經啟動成功啦.

到了這裏服務已啟動完畢

註意:啟動elk服務不建議用root啟動,新建用戶並把elk目錄權限給新建用戶.

六.安裝遇到的問題

  max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

  執行:sysctl -w vm.max_map_count=262144

  

elasticsearch-安裝-1