es6学习之路-安装es-head插件(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 进程号

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值