ElasticSearch6.x安装、ElasticSearch head插件

一.安装Elasticsearch

1. 安装jdk1.8环境,安装过程忽略

2. 下载最新Elasticsearch 6.3.0

下载地址请下载详细文档: https://download.csdn.net/download/cowbin2012/10729506

3. 安装Elasticsearch

rpm -ivh elasticsearch-6.3.0.rpm

 

项目所在:/usr/share/elasticsearch

4.修改配置文件

[root@localhost]# vi /etc/elasticsearch/elasticsearch.yml  

network.host: 0.0.0.0

http.post:  9200     #设置端口号  

bootstrap.memory_lock: false

bootstrap.system_call_filter: false

http.cors.enabled: true

http.cors.allow-origin: "*"

5.启动

service elasticsearch start

二.安装ElasticSearch head插件

1. 安装NodeJS

wget node.tar.gz

下载地址请下载详细文档: https://download.csdn.net/download/cowbin2012/10729506

 

配置下环境变量,编辑/etc/profile添加

配置请查看详细文档: https://download.csdn.net/download/cowbin2012/10729506

执行 source /etc/profile

2.安装npm

配置请查看详细文档: https://download.csdn.net/download/cowbin2012/10729506

也可以在别的地方下载后上传到服务器

[root@node1 ~]$ ls

master.zip

[es@node1 ~]$ unzip master.zip

3.下载依赖

进入elasticsearch-head-master目录,执行下面命令

 

[root@node1 elasticsearch-head-master]$ npm install

 

修改Head插件配置文件

 

[es@node1 elasticsearch-head-master]$ vi Gruntfile.js

找到connect:server,添加hostname一项,如下

connect: {

                        server: {

                                options: {

                                        hostname: '0.0.0.0',

                                        port: 9100,

                                        base: '.',

                                        keepalive: true

                                }

                        }

                }

 

4.启动head

通过命令grunt server启动head

 

[root@node1 elasticsearch-head-master]$ grunt server

需要在head的目录下运行

Running "connect:server" (connect) task

Waiting forever...

Started connect web server on http://node1:9100

 

访问:http://127.0.0.1:9100/

 

三.启动错误

查看详细文档: https://download.csdn.net/download/cowbin2012/10729506

bootstrap.memory_lock: false

bootstrap.system_call_filter: false

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值