您的位置:首页 > 其它

Elasticsearch 5.0 —— Head插件部署指南 的补充

2016-12-13 00:00 471 查看
摘要: 以我自己的升级过程作为补充

这里是head的官方说明方法:https://github.com/mobz/elasticsearch-head#running-with-built-in-server

原理是独自运行一个程序,提供以前head插件提供的功能。所以ES中不必再安装head插件,取而代之的是head的代码(JS)独立运行在外部,包括其他非ES的服务器上。

所以需要安装node,运行命令npm install是安装所有node js的依赖包,这个过程比较慢,需要连接到互联网上,可能会报错,但是warning可以忽略。最下面是我的安装打印记录。

一般linux上都有git,所以直接用git下载head的源代码。

node是从官方下载的。

关于grunt,在npm install后会在所在目录中新建node_modules目录并放入所有依赖包。我们使用的grunt位于node_modules/grunt/bin/中。

[appadmin@hadoop4 es_head]$ pwd
/apphome/es_head
[appadmin@hadoop4 es_head]$ node_modules/grunt/bin/grunt -V
grunt-cli v1.2.0
grunt v1.0.1
[appadmin@hadoop4 es_head]$

启动服务器即在head目录中运行grunt server。注意需要设置环境变量:

export NODE_HOME=/opt/node692/
export PATH=$PATH:$NODE_HOME/bin

[appadmin@hadoop4 es_head]$ node_modules/grunt/bin/grunt server
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100 ^C
[appadmin@hadoop4 es_head]$

下面是安装node依赖包时的输出。过程比较慢。

[appadmin@hadoop4 elasticsearch-head-master]$
[appadmin@hadoop4 elasticsearch-head-master]$ npm install
npm WARN prefer global coffee-script@1.10.0 should be installed with -g

> phantomjs-prebuilt@2.1.14 install /home/appadmin/elasticsearch-head-master/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
[==----                                                                                                                                                                                     [====-----------                                                                                                                                                                                [===========---------                                                                                                                                                                           [=========================                                                                                                                      [========================================] 100%
Received 22866K total.
Extracting tar contents (via spawned process)
Removing /home/appadmin/elasticsearch-head-master/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1481614187511/phantomjs-2.1.1-linux-x86_64 -> /home/appadmin/elasticsearch-head-master/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /home/appadmin/elasticsearch-head-master/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
elasticsearch-head@0.0.0 /home/appadmin/elasticsearch-head-master
├─┬ grunt@1.0.1
│ ├── coffee-script@1.10.0
│ ├─┬ dateformat@1.0.12
│ │ ├── get-stdin@4.0.1
│ │ └─┬ meow@3.7.0
│ │   ├─┬ camelcase-keys@2.1.0
│ │   │ └── camelcase@2.1.1
│ │   ├── decamelize@1.2.0
│ │   ├─┬ loud-rejection@1.6.0
│ │   │ ├─┬ currently-unhandled@0.4.1
│ │   │ │ └── array-find-index@1.0.2
│ │   │ └── signal-exit@3.0.2
│ │   ├── map-obj@1.0.1
│ │   ├── minimist@1.2.0
│ │   ├─┬ normalize-package-data@2.3.5
│ │   │ ├── hosted-git-info@2.1.5
│ │   │ ├─┬ is-builtin-module@1.0.0
│ │   │ │ └── builtin-modules@1.1.1
│ │   │ └─┬ validate-npm-package-license@3.0.1
│ │   │   ├─┬ spdx-correct@1.0.2
│ │   │   │ └── spdx-license-ids@1.2.2
│ │   │   └── spdx-expression-parse@1.0.4
│ │   ├─┬ read-pkg-up@1.0.1
│ │   │ ├─┬ find-up@1.1.2
│ │   │ │ └── path-exists@2.1.0
│ │   │ └─┬ read-pkg@1.1.0
│ │   │   ├─┬ load-json-file@1.1.0
│ │   │   │ ├─┬ parse-json@2.2.0
│ │   │   │ │ └─┬ error-ex@1.3.0
│ │   │   │ │   └── is-arrayish@0.2.1
│ │   │   │ ├── pify@2.3.0
│ │   │   │ └─┬ strip-bom@2.0.0
│ │   │   │   └── is-utf8@0.2.1
│ │   │   └── path-type@1.1.0
│ │   ├─┬ redent@1.0.0
│ │   │ ├─┬ indent-string@2.1.0
│ │   │ │ └─┬ repeating@2.0.1
│ │   │ │   └─┬ is-finite@1.0.2
│ │   │ │     └── number-is-nan@1.0.1
│ │   │ └── strip-indent@1.0.1
│ │   └── trim-newlines@1.0.0
│ ├── eventemitter2@0.4.14
│ ├── exit@0.1.2
│ ├─┬ findup-sync@0.3.0
│ │ └── glob@5.0.15
│ ├─┬ glob@7.0.6
│ │ ├── fs.realpath@1.0.0
│ │ ├─┬ inflight@1.0.6
│ │ │ └── wrappy@1.0.2
│ │ ├── inherits@2.0.3
│ │ └── once@1.4.0
│ ├─┬ grunt-cli@1.2.0
│ │ └── resolve@1.1.7
│ ├── grunt-known-options@1.1.0
│ ├─┬ grunt-legacy-log@1.0.0
│ │ ├─┬ grunt-legacy-log-utils@1.0.0
│ │ │ └── lodash@4.3.0
│ │ ├── hooker@0.2.3
│ │ └── underscore.string@3.2.3
│ ├─┬ grunt-legacy-util@1.0.0
│ │ ├── getobject@0.1.0
│ │ ├── lodash@4.3.0
│ │ └─┬ which@1.2.12
│ │   └── isexe@1.1.2
│ ├── iconv-lite@0.4.15
│ ├─┬ js-yaml@3.5.5
│ │ ├── argparse@1.0.9
│ │ └── esprima@2.7.3
│ ├─┬ minimatch@3.0.3
│ │ └─┬ brace-expansion@1.1.6
│ │   ├── balanced-match@0.4.2
│ │   └── concat-map@0.0.1
│ ├─┬ nopt@3.0.6
│ │ └── abbrev@1.0.9
│ ├── path-is-absolute@1.0.1
│ └── rimraf@2.2.8
├─┬ grunt-contrib-clean@1.0.0
│ ├── async@1.5.2
│ └── rimraf@2.5.4
├─┬ grunt-contrib-concat@1.0.1
│ ├─┬ chalk@1.1.3
│ │ ├── ansi-styles@2.2.1
│ │ ├── escape-string-regexp@1.0.5
│ │ ├─┬ has-ansi@2.0.0
│ │ │ └── ansi-regex@2.0.0
│ │ ├── strip-ansi@3.0.1
│ │ └── supports-color@2.0.0
│ └── source-map@0.5.6
├─┬ grunt-contrib-connect@1.0.2
│ ├─┬ connect@3.5.0
│ │ ├─┬ debug@2.2.0
│ │ │ └── ms@0.7.1
│ │ ├─┬ finalhandler@0.5.0
│ │ │ ├── statuses@1.3.1
│ │ │ └── unpipe@1.0.0
│ │ ├── parseurl@1.3.1
│ │ └── utils-merge@1.0.0
│ ├── connect-livereload@0.5.4
│ ├── http2@3.3.6
│ ├─┬ morgan@1.7.0
│ │ ├── basic-auth@1.0.4
│ │ ├── depd@1.1.0
│ │ ├─┬ on-finished@2.3.0
│ │ │ └── ee-first@1.1.1
│ │ └── on-headers@1.0.1
│ ├─┬ opn@4.0.2
│ │ ├── object-assign@4.1.0
│ │ └─┬ pinkie-promise@2.0.1
│ │   └── pinkie@2.0.4
│ ├── portscanner@1.2.0
│ ├─┬ serve-index@1.8.0
│ │ ├─┬ accepts@1.3.3
│ │ │ └── negotiator@0.6.1
│ │ ├── batch@0.5.3
│ │ ├── escape-html@1.0.3
│ │ ├─┬ http-errors@1.5.1
│ │ │ └── setprototypeof@1.0.2
│ │ └─┬ mime-types@2.1.13
│ │   └── mime-db@1.25.0
│ └─┬ serve-static@1.11.1
│   ├── encodeurl@1.0.1
│   └─┬ send@0.14.1
│     ├── destroy@1.0.4
│     ├── etag@1.7.0
│     └── fresh@0.3.0
├─┬ grunt-contrib-copy@1.0.0
│ └── file-sync-cmp@0.1.1
├─┬ grunt-contrib-jasmine@1.0.3
│ ├── es5-shim@4.5.9
│ ├─┬ grunt-lib-phantomjs@1.1.0
│ │ ├─┬ phantomjs-prebuilt@2.1.14
│ │ │ ├── es6-promise@4.0.5
│ │ │ ├─┬ extract-zip@1.5.0
│ │ │ │ ├─┬ concat-stream@1.5.0
│ │ │ │ │ └── typedarray@0.0.6
│ │ │ │ ├── debug@0.7.4
│ │ │ │ ├─┬ mkdirp@0.5.0
│ │ │ │ │ └── minimist@0.0.8
│ │ │ │ └─┬ yauzl@2.4.1
│ │ │ │   └─┬ fd-slicer@1.0.1
│ │ │ │     └── pend@1.2.0
│ │ │ ├─┬ fs-extra@1.0.0
│ │ │ │ ├── jsonfile@2.4.0
│ │ │ │ └── klaw@1.3.1
│ │ │ ├─┬ hasha@2.2.0
│ │ │ │ └── is-stream@1.1.0
│ │ │ ├── kew@0.7.0
│ │ │ ├── progress@1.1.8
│ │ │ ├─┬ request@2.79.0
│ │ │ │ ├── aws-sign2@0.6.0
│ │ │ │ ├── aws4@1.5.0
│ │ │ │ ├── caseless@0.11.0
│ │ │ │ ├─┬ combined-stream@1.0.5
│ │ │ │ │ └── delayed-stream@1.0.0
│ │ │ │ ├── forever-agent@0.6.1
│ │ │ │ ├─┬ form-data@2.1.2
│ │ │ │ │ └── asynckit@0.4.0
│ │ │ │ ├─┬ har-validator@2.0.6
│ │ │ │ │ ├─┬ commander@2.9.0
│ │ │ │ │ │ └── graceful-readlink@1.0.1
│ │ │ │ │ └─┬ is-my-json-valid@2.15.0
│ │ │ │ │   ├── generate-function@2.0.0
│ │ │ │ │   ├─┬ generate-object-property@1.2.0
│ │ │ │ │   │ └── is-property@1.0.2
│ │ │ │ │   ├── jsonpointer@4.0.0
│ │ │ │ │   └── xtend@4.0.1
│ │ │ │ ├─┬ hawk@3.1.3
│ │ │ │ │ ├── boom@2.10.1
│ │ │ │ │ ├── cryptiles@2.0.5
│ │ │ │ │ ├── hoek@2.16.3
│ │ │ │ │ └── sntp@1.0.9
│ │ │ │ ├─┬ http-signature@1.1.1
│ │ │ │ │ ├── assert-plus@0.2.0
│ │ │ │ │ ├─┬ jsprim@1.3.1
│ │ │ │ │ │ ├── extsprintf@1.0.2
│ │ │ │ │ │ ├── json-schema@0.2.3
│ │ │ │ │ │ └── verror@1.3.6
│ │ │ │ │ └─┬ sshpk@1.10.1
│ │ │ │ │   ├── asn1@0.2.3
│ │ │ │ │   ├── assert-plus@1.0.0
│ │ │ │ │   ├── bcrypt-pbkdf@1.0.0
│ │ │ │ │   ├─┬ dashdash@1.14.1
│ │ │ │ │   │ └── assert-plus@1.0.0
│ │ │ │ │   ├── ecc-jsbn@0.1.1
│ │ │ │ │   ├─┬ getpass@0.1.6
│ │ │ │ │   │ └── assert-plus@1.0.0
│ │ │ │ │   ├── jodid25519@1.0.2
│ │ │ │ │   ├── jsbn@0.1.0
│ │ │ │ │   └── tweetnacl@0.14.4
│ │ │ │ ├── is-typedarray@1.0.0
│ │ │ │ ├── isstream@0.1.2
│ │ │ │ ├── json-stringify-safe@5.0.1
│ │ │ │ ├── oauth-sign@0.8.2
│ │ │ │ ├── qs@6.3.0
│ │ │ │ ├── stringstream@0.0.5
│ │ │ │ ├─┬ tough-cookie@2.3.2
│ │ │ │ │ └── punycode@1.4.1
│ │ │ │ ├── tunnel-agent@0.4.3
│ │ │ │ └── uuid@3.0.1
│ │ │ └─┬ request-progress@2.0.1
│ │ │   └── throttleit@1.0.0
│ │ ├── rimraf@2.5.4
│ │ ├── semver@5.3.0
│ │ └─┬ temporary@0.0.8
│ │   └── package@1.0.1
│ ├── jasmine-core@2.5.2
│ ├── lodash@2.4.2
│ └── sprintf-js@1.0.3
├─┬ grunt-contrib-watch@1.0.0
│ ├─┬ gaze@1.1.2
│ │ └─┬ globule@1.1.0
│ │   ├── glob@7.1.1
│ │   └── lodash@4.16.6
│ ├── lodash@3.10.1
│ └─┬ tiny-lr@0.2.1
│   ├─┬ faye-websocket@0.10.0
│   │ └─┬ websocket-driver@0.6.5
│   │   └── websocket-extensions@0.1.1
│   ├── livereload-js@2.2.2
│   └── qs@5.1.0
├── grunt-karma@2.0.0
└─┬ karma@1.3.0
├── bluebird@3.4.6
├─┬ body-parser@1.14.2
│ ├── bytes@2.2.0
│ ├── content-type@1.0.2
│ ├── http-errors@1.3.1
│ ├── iconv-lite@0.4.13
│ ├── qs@5.2.0
│ ├─┬ raw-body@2.1.7
│ │ ├── bytes@2.4.0
│ │ └── iconv-lite@0.4.13
│ └─┬ type-is@1.6.14
│   └── media-typer@0.3.0
├─┬ chokidar@1.6.1
│ ├─┬ anymatch@1.3.0
│ │ ├── arrify@1.0.1
│ │ └─┬ micromatch@2.3.11
│ │   ├─┬ arr-diff@2.0.0
│ │   │ └── arr-flatten@1.0.1
│ │   ├─┬ braces@1.8.5
│ │   │ ├─┬ expand-range@1.8.2
│ │   │ │ └─┬ fill-range@2.2.3
│ │   │ │   ├── is-number@2.1.0
│ │   │ │   ├── isobject@2.1.0
│ │   │ │   ├── randomatic@1.1.6
│ │   │ │   └── repeat-string@1.6.1
│ │   │ ├── preserve@0.2.0
│ │   │ └── repeat-element@1.1.2
│ │   ├─┬ expand-brackets@0.1.5
│ │   │ └── is-posix-bracket@0.1.1
│ │   ├── extglob@0.3.2
│ │   ├── filename-regex@2.0.0
│ │   ├─┬ kind-of@3.1.0
│ │   │ └── is-buffer@1.1.4
│ │   ├── normalize-path@2.0.1
│ │   ├─┬ object.omit@2.0.1
│ │   │ ├─┬ for-own@0.1.4
│ │   │ │ └── for-in@0.1.6
│ │   │ └── is-extendable@0.1.1
│ │   ├─┬ parse-glob@3.0.4
│ │   │ ├── glob-base@0.3.0
│ │   │ └── is-dotfile@1.0.2
│ │   └─┬ regex-cache@0.4.3
│ │     ├── is-equal-shallow@0.1.3
│ │     └── is-primitive@2.0.0
│ ├── async-each@1.0.1
│ ├── glob-parent@2.0.0
│ ├─┬ is-binary-path@1.0.1
│ │ └── binary-extensions@1.8.0
│ ├─┬ is-glob@2.0.1
│ │ └── is-extglob@1.0.0
│ └─┬ readdirp@2.1.0
│   ├─┬ readable-stream@2.0.6
│   │ ├── isarray@1.0.0
│   │ ├── process-nextick-args@1.0.7
│   │ └── util-deprecate@1.0.2
│   └── set-immediate-shim@1.0.1
├── colors@1.1.2
├─┬ combine-lists@1.0.1
│ └── lodash@4.17.2
├── core-js@2.4.1
├── di@0.0.1
├─┬ dom-serialize@2.2.1
│ ├── custom-event@1.0.1
│ ├── ent@2.2.0
│ ├── extend@3.0.0
│ └── void-elements@2.0.1
├─┬ expand-braces@0.1.2
│ ├── array-slice@0.2.3
│ ├── array-unique@0.2.1
│ └─┬ braces@0.1.5
│   └─┬ expand-range@0.1.1
│     ├── is-number@0.1.1
│     └── repeat-string@0.2.2
├── graceful-fs@4.1.11
├─┬ http-proxy@1.16.2
│ ├── eventemitter3@1.2.0
│ └── requires-port@1.0.0
├── isbinaryfile@3.0.1
├─┬ log4js@0.6.38
│ ├─┬ readable-stream@1.0.34
│ │ ├── core-util-is@1.0.2
│ │ ├── isarray@0.0.1
│ │ └── string_decoder@0.10.31
│ └── semver@4.3.6
├── mime@1.3.4
├─┬ optimist@0.6.1
│ ├── minimist@0.0.10
│ └── wordwrap@0.0.3
├── qjobs@1.1.5
├── range-parser@1.2.0
├── rimraf@2.5.4
├─┬ socket.io@1.4.7
│ ├─┬ engine.io@1.6.10
│ │ ├─┬ accepts@1.1.4
│ │ │ ├─┬ mime-types@2.0.14
│ │ │ │ └── mime-db@1.12.0
│ │ │ └── negotiator@0.4.9
│ │ ├── base64id@0.1.0
│ │ ├─┬ engine.io-parser@1.2.4
│ │ │ ├── after@0.8.1
│ │ │ ├── arraybuffer.slice@0.0.6
│ │ │ ├── base64-arraybuffer@0.1.2
│ │ │ ├── blob@0.0.4
│ │ │ ├─┬ has-binary@0.1.6
│ │ │ │ └── isarray@0.0.1
│ │ │ └── utf8@2.1.0
│ │ └─┬ ws@1.0.1
│ │   ├── options@0.0.6
│ │   └── ultron@1.0.2
│ ├─┬ has-binary@0.1.7
│ │ └── isarray@0.0.1
│ ├─┬ socket.io-adapter@0.4.0
│ │ └─┬ socket.io-parser@2.2.2
│ │   ├── debug@0.7.4
│ │   ├── isarray@0.0.1
│ │   └── json3@3.2.6
│ ├─┬ socket.io-client@1.4.6
│ │ ├── backo2@1.0.2
│ │ ├── component-bind@1.0.0
│ │ ├── component-emitter@1.2.0
│ │ ├─┬ engine.io-client@1.6.9
│ │ │ ├── component-inherit@0.0.3
│ │ │ ├── has-cors@1.1.0
│ │ │ ├── parsejson@0.0.1
│ │ │ ├── parseqs@0.0.2
│ │ │ ├── xmlhttprequest-ssl@1.5.1
│ │ │ └── yeast@0.1.2
│ │ ├── indexof@0.0.1
│ │ ├── object-component@0.0.3
│ │ ├─┬ parseuri@0.0.4
│ │ │ └─┬ better-assert@1.0.2
│ │ │   └── callsite@1.0.0
│ │ └── to-array@0.1.4
│ └─┬ socket.io-parser@2.2.6
│   ├── benchmark@1.0.0
│   ├── component-emitter@1.1.2
│   ├── isarray@0.0.1
│   └── json3@3.3.2
├─┬ tmp@0.0.28
│ └── os-tmpdir@1.0.2
└─┬ useragent@2.1.9
└── lru-cache@2.2.4

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression
[appadmin@hadoop4 elasticsearch-head-master]$
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ELK; head