https://github.com/mobz/elasticsearch-head#running-with-built-in-server独立的服务启动

本文记录了在CentOS上使用npm安装Elasticsearch Head插件的过程,包括安装依赖、克隆GitHub仓库、配置Gruntfile.js文件及运行过程中遇到的问题与解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://github.com/mobz/elasticsearch-head#running-with-built-in-serverhttps://github.com/mobz/elasticsearch-head#running-with-built-in-serverhttp://blog.youkuaiyun.com/onlylove_longshao/article/details/72765696








[wangshumin@CentOSNode1 bin]$ yum search  npm 

已加载插件:fastestmirror, langpacks
Determining fastest mirrors
 * base: mirrors.cn99.com
 * extras: mirrors.cn99.com
 * updates: mirrors.zju.edu.cn
========================================================================================= 匹配:npm =========================================================================================
python-kdcproxy.noarch : MS-KKDCP (kerberos proxy) WSGI module
[wangshumin@CentOSNode1 bin]$ yum install python-kdcproxy.noarch
已加载插件:fastestmirror, langpacks
您需要 root 权限执行此命令。
[wangshumin@CentOSNode1 bin]$ sudo yum install python-kdcproxy.noarch
[sudo] wangshumin 的密码:
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirrors.neusoft.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 python-kdcproxy.noarch.0.0.3.2-1.el7 将被 安装
--> 解决依赖关系完成


依赖关系解决


=============================================================================================================================================================================================
 Package                                            架构                                      版本                                             源                                       大小
=============================================================================================================================================================================================
正在安装:
 python-kdcproxy                                    noarch                                    0.3.2-1.el7                                      base                                     27 k


事务概要
=============================================================================================================================================================================================
安装  1 软件包


总下载量:27 k
安装大小:94 k
Is this ok [y/d/N]: y
Downloading packages:
python-kdcproxy-0.3.2-1.el7.noarch.rpm                                                                                                                                |  27 kB  00:00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : python-kdcproxy-0.3.2-1.el7.noarch                                                                                                                                       1/1 
  验证中      : python-kdcproxy-0.3.2-1.el7.noarch                                                                                                                                       1/1 


已安装:
  python-kdcproxy.noarch 0:0.3.2-1.el7                                                                                                                                                       


完毕!
[wangshumin@CentOSNode1 bin]$ yum search  npm 
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.cn99.com
 * extras: mirrors.cn99.com
 * updates: mirrors.zju.edu.cn
========================================================================================= 匹配:npm =========================================================================================
python-kdcproxy.noarch : MS-KKDCP (kerberos proxy) WSGI module
[wangshumin@CentOSNode1 bin]$ ll
总用量 24312
-rwxrwxr-x. 1 wangshumin wangshumin 24888558 6月  29 2016 node
lrwxrwxrwx. 1 wangshumin wangshumin       38 6月  29 2016 npm -> ../lib/node_modules/npm/bin/npm-cli.js
-rw-rw-r--. 1 wangshumin wangshumin     2729 1月  28 23:23 npm-debug.log
[wangshumin@CentOSNode1 bin]$ npm install -g grunt-cli
/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt -> /home/wangshumin/ekl/node-v4.4.7-linux-x64/lib/node_modules/grunt-cli/bin/grunt
grunt-cli@1.2.0 /home/wangshumin/ekl/node-v4.4.7-linux-x64/lib/node_modules/grunt-cli
├── grunt-known-options@1.1.0
├── nopt@3.0.6 (abbrev@1.1.1)
├── resolve@1.1.7
└── findup-sync@0.3.0 (glob@5.0.15)
[wangshumin@CentOSNode1 bin]$  npm install grunt --save-dev 
npm ERR! not a package /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt
npm ERR! addLocal Could not install /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt
npm ERR! Linux 3.10.0-693.el7.x86_64
npm ERR! argv "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/node" "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm" "install" "grunt" "--save-dev"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! path /tmp/npm-5368-dc5a1391/unpack-01d8ebec38e9/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open


npm ERR! enoent ENOENT: no such file or directory, open '/tmp/npm-5368-dc5a1391/unpack-01d8ebec38e9/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 


npm ERR! Please include the following file with any support request:
npm ERR!     /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm-debug.log
[wangshumin@CentOSNode1 bin]$ grunt -version
grunt-cli v1.2.0
[wangshumin@CentOSNode1 bin]$ npm install grunt --save-dev
npm ERR! not a package /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt
npm ERR! addLocal Could not install /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt
npm ERR! Linux 3.10.0-693.el7.x86_64
npm ERR! argv "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/node" "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm" "install" "grunt" "--save-dev"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! path /tmp/npm-5393-80bb7d4a/unpack-dbfe874fac2d/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open


npm ERR! enoent ENOENT: no such file or directory, open '/tmp/npm-5393-80bb7d4a/unpack-dbfe874fac2d/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 


npm ERR! Please include the following file with any support request:
npm ERR!     /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm-debug.log
[wangshumin@CentOSNode1 bin]$ git clone git://github.com/mobz/elasticsearch-head.git
正克隆到 'elasticsearch-head'...
remote: Counting objects: 4224, done.
remote: Total 4224 (delta 0), reused 0 (delta 0), pack-reused 4224
接收对象中: 100% (4224/4224), 2.16 MiB | 126.00 KiB/s, done.
处理 delta 中: 100% (2329/2329), done.
[wangshumin@CentOSNode1 bin]$ cd elasticsearch-head
[wangshumin@CentOSNode1 elasticsearch-head]$ ll
总用量 44
-rw-rw-r--. 1 wangshumin wangshumin  248 1月  28 23:29 Dockerfile
-rw-rw-r--. 1 wangshumin wangshumin  221 1月  28 23:29 Dockerfile-alpine
-rw-rw-r--. 1 wangshumin wangshumin  104 1月  28 23:29 elasticsearch-head.sublime-project
-rw-rw-r--. 1 wangshumin wangshumin 2171 1月  28 23:29 Gruntfile.js
-rw-rw-r--. 1 wangshumin wangshumin 3482 1月  28 23:29 grunt_fileSets.js
-rw-rw-r--. 1 wangshumin wangshumin 1088 1月  28 23:29 index.html
-rw-rw-r--. 1 wangshumin wangshumin  559 1月  28 23:29 LICENCE
-rw-rw-r--. 1 wangshumin wangshumin  886 1月  28 23:29 package.json
-rw-rw-r--. 1 wangshumin wangshumin  100 1月  28 23:29 plugin-descriptor.properties
drwxrwxr-x. 4 wangshumin wangshumin   53 1月  28 23:29 proxy
-rw-rw-r--. 1 wangshumin wangshumin 6944 1月  28 23:29 README.textile
drwxrwxr-x. 5 wangshumin wangshumin  140 1月  28 23:29 _site
drwxrwxr-x. 4 wangshumin wangshumin   31 1月  28 23:29 src
drwxrwxr-x. 4 wangshumin wangshumin   70 1月  28 23:29 test
[wangshumin@CentOSNode1 elasticsearch-head]$ npm install
npm WARN package.json elasticsearch-head@0.0.0 license should be a valid SPDX license expression
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
npm WARN engine hawk@6.0.2: wanted: {"node":">=4.5.0"} (current: {"node":"4.4.7","npm":"2.15.8"})
npm WARN optional dep failed, continuing fsevents@1.1.3
/
> phantomjs-prebuilt@2.1.16 install /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/elasticsearch-head/node_modules/grunt-contrib-jasmine/node_modules/grunt-lib-phantomjs/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...
  [=====================================---] 92%
Error making request.
Error: read ECONNRESET
    at exports._errnoException (util.js:873:11)
    at TLSWrap.onread (net.js:557:26)


Please report this full log at https://github.com/Medium/phantomjs
npm ERR! Linux 3.10.0-693.el7.x86_64
npm ERR! argv "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/node" "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE


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 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs phantomjs-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.


npm ERR! Please include the following file with any support request:
npm ERR!     /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/elasticsearch-head/npm-debug.log
[wangshumin@CentOSNode1 elasticsearch-head]$ ll
总用量 784
-rw-rw-r--.  1 wangshumin wangshumin    248 1月  28 23:29 Dockerfile
-rw-rw-r--.  1 wangshumin wangshumin    221 1月  28 23:29 Dockerfile-alpine
-rw-rw-r--.  1 wangshumin wangshumin    104 1月  28 23:29 elasticsearch-head.sublime-project
-rw-rw-r--.  1 wangshumin wangshumin   2171 1月  28 23:29 Gruntfile.js
-rw-rw-r--.  1 wangshumin wangshumin   3482 1月  28 23:29 grunt_fileSets.js
-rw-rw-r--.  1 wangshumin wangshumin   1088 1月  28 23:29 index.html
-rw-rw-r--.  1 wangshumin wangshumin    559 1月  28 23:29 LICENCE
drwxrwxr-x. 12 wangshumin wangshumin    218 1月  28 23:40 node_modules
-rw-rw-r--.  1 wangshumin wangshumin 755901 1月  28 23:40 npm-debug.log
-rw-rw-r--.  1 wangshumin wangshumin    886 1月  28 23:29 package.json
-rw-rw-r--.  1 wangshumin wangshumin    100 1月  28 23:29 plugin-descriptor.properties
drwxrwxr-x.  4 wangshumin wangshumin     53 1月  28 23:29 proxy
-rw-rw-r--.  1 wangshumin wangshumin   6944 1月  28 23:29 README.textile
drwxrwxr-x.  5 wangshumin wangshumin    140 1月  28 23:29 _site
drwxrwxr-x.  4 wangshumin wangshumin     31 1月  28 23:29 src
drwxrwxr-x.  4 wangshumin wangshumin     70 1月  28 23:29 test
[wangshumin@CentOSNode1 elasticsearch-head]$ vim  Gruntfile.js
[wangshumin@CentOSNode1 elasticsearch-head]$ ll
总用量 784
-rw-rw-r--.  1 wangshumin wangshumin    248 1月  28 23:29 Dockerfile
-rw-rw-r--.  1 wangshumin wangshumin    221 1月  28 23:29 Dockerfile-alpine
-rw-rw-r--.  1 wangshumin wangshumin    104 1月  28 23:29 elasticsearch-head.sublime-project
-rw-rw-r--.  1 wangshumin wangshumin   2171 1月  28 23:29 Gruntfile.js
-rw-rw-r--.  1 wangshumin wangshumin   3482 1月  28 23:29 grunt_fileSets.js
-rw-rw-r--.  1 wangshumin wangshumin   1088 1月  28 23:29 index.html
-rw-rw-r--.  1 wangshumin wangshumin    559 1月  28 23:29 LICENCE
drwxrwxr-x. 12 wangshumin wangshumin    218 1月  28 23:40 node_modules
-rw-rw-r--.  1 wangshumin wangshumin 755901 1月  28 23:40 npm-debug.log
-rw-rw-r--.  1 wangshumin wangshumin    886 1月  28 23:29 package.json
-rw-rw-r--.  1 wangshumin wangshumin    100 1月  28 23:29 plugin-descriptor.properties
drwxrwxr-x.  4 wangshumin wangshumin     53 1月  28 23:29 proxy
-rw-rw-r--.  1 wangshumin wangshumin   6944 1月  28 23:29 README.textile
drwxrwxr-x.  5 wangshumin wangshumin    140 1月  28 23:29 _site
drwxrwxr-x.  4 wangshumin wangshumin     31 1月  28 23:29 src
drwxrwxr-x.  4 wangshumin wangshumin     70 1月  28 23:29 test
[wangshumin@CentOSNode1 elasticsearch-head]$ npm install
npm WARN package.json elasticsearch-head@0.0.0 license should be a valid SPDX license expression
npm WARN engine hawk@6.0.2: wanted: {"node":">=4.5.0"} (current: {"node":"4.4.7","npm":"2.15.8"})
-
> phantomjs-prebuilt@2.1.16 install /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/elasticsearch-head/node_modules/grunt-contrib-jasmine/node_modules/grunt-lib-phantomjs/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...
  [===-------------------------------------] 7%^C
[wangshumin@CentOSNode1 elasticsearch-head]$ npm run start


> elasticsearch-head@0.0.0 start /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/elasticsearch-head
> grunt server


Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值