ES添加Head插件以及集群安装
1、更新centos7的库
sudo yum update -y
2、安装一系列文件(已安装可以不安装)
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 sudo yum install npm sudo yum install -y git sudo yum install -y bzip2
3、从git下载head
git clone git://github.com/mobz/elasticsearch-head.git
#将源码包下载后剪切到/elasticsearch-head目录,并改所属用户和组
sudo chown -R yangwj:yangwj ./elasticsearch-head
4、编译head
#进入到elasticsearch-head中 cd elasticsearch-head #编译安装 npm install
5、修改elasticsearch-head-master/Gruntfile.js文件
打开elasticsearch-head-master/Gruntfile.js,找到下面connect属性,新增hostname: '0.0.0.0', connect: { server: { options: { hostname: '0.0.0.0', port: 9100, base: '.', keepalive: true } } }
6、修改elasticsearch-5.4.3/config/elasticsearch.yml
编辑elasticsearch-5.4.3/config/elasticsearch.yml,加入以下内容: http.cors.enabled: true http.cors.allow-origin: "*"
7、启动所有的es
./elasticsearch-5.4.3/bin/elasticsearch -d #后台启动
8、运行head,因为head是nodejs编写的,所以执行
#运行服务
npm run start
9、查看界面
看到这个说明成功了.......
10、集群安装配置
本文来自博客园,作者:小白啊小白,Fighting,转载请注明原文链接:https://www.cnblogs.com/ywjfx/p/13463158.html