安装elasticsearch-head(二)

检查node环境 检查npm

安装地址:https://github.com/mobz/elasticsearch-head

安装elasticsearch-head

git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
npm run start
  • 注意事项
    需要更改_site/app.jselasticsearch对应域名/IP和端口http://xxxxx:8301

异常情况

  • 出现如下错误
➜  elasticsearch-head git:(master) npm install
npm WARN deprecated coffee-script@1.10.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated http2@3.3.7: Use the built-in module in node 9.0.0 or newer, instead

> phantomjs-prebuilt@2.1.16 install /data/es/elasticsearch-head/node_modules/phantomjs-prebuilt
> node install.js

Considering PhantomJS found at /usr/local/bin/phantomjs
Found PhantomJS at /usr/local/bin/phantomjs ...verifying
Writing location.js file
Error checking path, continuing { Error: EACCES: permission denied, open '/data/es/elasticsearch-head/node_modules/phantomjs-prebuilt/lib/location.js'
    at Object.openSync (fs.js:438:3)
    at Object.writeFileSync (fs.js:1189:35)
    at writeLocationFile (/data/es/elasticsearch-head/node_modules/phantomjs-prebuilt/lib/util.js:84:6)
    at Promise._successFn (/data/es/elasticsearch-head/node_modules/phantomjs-prebuilt/install.js:375:11)
    at nextTickCallback (/data/es/elasticsearch-head/node_modules/kew/kew.js:47:28)
    at process._tickCallback (internal/process/next_tick.js:61:11)
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path:
   '/data/es/elasticsearch-head/node_modules/phantomjs-prebuilt/lib/location.js' }
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /data/es/elasticsearch-head/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1561442802577/phantomjs-2.1.1-linux-x86_64 -> /data/es/elasticsearch-head/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1561442802577/phantomjs-2.1.1-linux-x86_64' -> '/data/es/elasticsearch-head/node_modules/phantomjs-prebuilt/lib/phantom']
  errno: -13,
  code: 'EACCES',
  syscall: 'link',
  path:
   '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1561442802577/phantomjs-2.1.1-linux-x86_64',
  dest:
   '/data/es/elasticsearch-head/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1561442802577/phantomjs-2.1.1-linux-x86_64' -> '/data/es/elasticsearch-head/node_modules/phantomjs-prebuilt/lib/phantom'
npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-06-25T06_06_45_918Z-debug.log

此时忽略phantomjs-prebuilt@2.1.16,执行命令如下

npm install phantomjs-prebuilt@2.1.16 --ignore-scripts
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ phantomjs-prebuilt@2.1.16
added 62 packages from 64 contributors, removed 4 packages and audited 1734 packages in 6.419s
found 32 vulnerabilities (18 low, 7 moderate, 7 high)
  run `npm audit fix` to fix them, or `npm audit` for details

然后执行

npm run start

> elasticsearch-head@0.0.0 start /data/es/elasticsearch-head
> grunt server

>> Local Npm module "grunt-contrib-jasmine" not found. Is it installed?

Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值