欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ElasticSearch安装head插件

程序员文章站 2024-02-24 11:37:34
...
#更新
sudo yum update -y

安装2个rpm包
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh https://kojipkgs.fedoraproject.org//packages/http-parser/2.7.1/3.el7/x86_64/http-parser-2.7.1-3.el7.x86_64.rpm

安装npm
sudo yum install npm

sudo yum install -y git

sudo yum install -y bzip2

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

#将源码包下载后剪切到/bigdata目录,并改所属用户和组
sudo chown -R xiaoniu:xiaoniu /bigdata/elasticsearch-head

#进入到elasticsearch-head中
cd elasticsearch-head
#编译安装
npm install


打开elasticsearch-head-master/Gruntfile.js,找到下面connect属性,新增hostname: '0.0.0.0',
		connect: {
                        server: {
                                options: {
                                        hostname: '0.0.0.0',
                                        port: 9100,
                                        base: '.',
                                        keepalive: true
                                }
                        }
                }



编辑elasticsearch-5.4.3/config/elasticsearch.yml,加入以下内容:
http.cors.enabled: true
http.cors.allow-origin: "*"

#运行服务
npm run start
相关标签: ElasticSearch head