您的位置:首页 > Web前端 > HTML5

ElasticSearch5.3安装Head插件

2017-04-18 19:16 543 查看
上一篇文章中本来觉得安装es head插件没什么麻烦,结果今天就遇到了不少问题

比如nmp grunt,,,,

我用python 跑爬虫,结果用淘宝npm镜像下载不了,,

关了之后就好使了、

但是呢出现grunt的模块没有安装的问题:

Local Npm module “grunt-contrib-clean” not found. Is it installed?

Local Npm module “grunt-contrib-concat” not found. Is it installed?

Local Npm module “grunt-contrib-watch” not found. Is it installed?

Local Npm module “grunt-contrib-connect” not found. Is it installed?

Local Npm module “grunt-contrib-copy” not found. Is it installed?

Local Npm module “grunt-contrib-jasmine” not found. Is it installed?

Warning: Task “connect:server” not found. Use –force to continue.

通过以下命令:

npm install grunt-contrib-clean –registry=https://registry.npm.taobao.org

npm install grunt-contrib-concat –registry=https://registry.npm.taobao.org

npm install grunt-contrib-watch –registry=https://registry.npm.taobao.org

npm install grunt-contrib-connect –registry=https://registry.npm.taobao.org

npm install grunt-contrib-copy –registry=https://registry.npm.taobao.org

npm install grunt-contrib-jasmine –registry=https://registry.npm.taobao.org

安装grunt模块,奇怪的是最后一个没有安装成功,是因为该模块依赖了phantomjs

但是配置之后,依然无法安装,但是有个博客也是没有安装十分成功,有警告,所以我想可能是es head不用依赖这个模块了,就直接

Grunt server

结果es head启动成功了。

但是启动之前要配置一下:

在elasticsearch.yml文件最后追加如下内容:

http.cors.enabled: true

http.cors.allow-origin: “*”

用于head 无法跨域访问es的问题

经过这次安装还了解了一些npm install 安装很慢的问题

1. 使用淘宝镜像:

淘宝npm镜像

• 搜索地址:http://npm.taobao.org/

• registry地址:http://registry.npm.taobao.org/

2. 看本机是否有其他程序占用网络资源
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: