ElasticSearch6.x安装、ElasticSearch head插件

版权声明:转载请注明出处 https://blog.csdn.net/cowbin2012/article/details/80717534

一.安装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

猜你喜欢

转载自blog.csdn.net/cowbin2012/article/details/80717534