您当前的位置: 首页 >  I.T10001

es6学习之路-安装es-head插件(2)

I.T10001 发布时间:2020-01-12 17:27:21 ,浏览量:2

环境

centos7 elastichsearch-6.2.3 node v8.11.1

安装elasticsearch

安装elasticsearch请查看:https://blog.csdn.net/mjlfto/article/details/79769152

安装node

1、到nodejs官网现在最新nodejs,官网下载地址:https://nodejs.org/en/download/ 

2、 解压压缩包 

3、配置环境变量

4、环境变量生效:source /etc/profile

5、执行:node -v

下载elastichsearch-head插件

1、安装git:yum install git 

2、git clone git://github.com/mobz/elasticsearch-head.git

3、cd elasticsearch-head

4、npm install,如下图,会报错

此时忽略报错,执行:npm install phantomjs-prebuilt@2.1.16 --ignore-scripts

5、npm run start(忽略)

grunt安装

npm install -g grunt-cli

修改Elasticsearch配置文件

vim elasticsearch-5.6.1/config/elasticsearch.yml

加入以一内容:

http.cors.enabled: truehttp.cors.allow-origin: "*"

修改Gruntfile.js,如下图:

增加hostname: ‘192.168.1.107’

启动elasticsearch-head:如下图

grunt server

浏览器访问(如无法访问,开启防火墙,添加9100到防火墙):http://192.168.1.107:9100/

elasticsearch-head 设置后台启动和关闭

启动(如下图,不能用root账户启动):nohup grunt server &exit

关闭:kill -9 进程号

关注
打赏
1688896170
查看更多评论

I.T10001

暂无认证

  • 2浏览

    0关注

    154博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.3912s