温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ELK 实验(七)Elasticsearch 集群管理

发布时间:2020-07-12 08:59:02 来源:网络 阅读:1763 作者:pcdog 栏目:大数据

Head 插件

head插件是一个elasticsearch的集群管理工具,它是完全由html5编写的独立网页程序。

Github:

https://github.com/mobz/elasticsearch-head

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

安装

./elasticsearch plugin -install /usr/elasticsearch-head

ELK 实验(七)Elasticsearch 集群管理

新版本不支持plugin 直接安装

安装nodejs

yum install nodejs -y

居然还没有nodejs

去官网下一个

https://nodejs.org/en/download/package-manager/

curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

ELK 实验(七)Elasticsearch 集群管理

再来

yum install -y nodejs

yum install -y gcc-c++ make

就有了,17M

ELK 实验(七)Elasticsearch 集群管理

ELK 实验(七)Elasticsearch 集群管理

验证下安装

node -v

npm -v

ELK 实验(七)Elasticsearch 集群管理

使用国内淘宝源安装grunt

cd elasticsearch-head/

npm install -g grunt --registry=https://registry.npm.taobao.org

ELK 实验(七)Elasticsearch 集群管理

ELK 实验(七)Elasticsearch 集群管理

npm install grunt --save

看看安装好了么

ls -d node_modules/grunt

ELK 实验(七)Elasticsearch 集群管理

npm install -g grunt-cli --registry=https://registry.npm.taobao.org

ELK 实验(七)Elasticsearch 集群管理

npm install --registry=https://registry.npm.taobao.org

ELK 实验(七)Elasticsearch 集群管理

出错鸟,连接被拒绝了,容我修个错误

PhantomJS not found on PATH 目录下没找到,去下载的时候在github被拒绝了,伟大的墙。习主席说什么来着,智者造桥,愚者造墙。

代码分支了

https://www.npmjs.com/package/phantomjs-prebuilt

npm install phantomjs-prebuilt

node ./install.js

ELK 实验(七)Elasticsearch 集群管理

/usr/elasticsearch-6.2.3/plugins/elasticsearch-head

vi Gruntfile.js

hostname: '*', #增加此行

ELK 实验(七)Elasticsearch 集群管理

vi _site/app.js

更新这句

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://192.168.209.168:9200";

启动服务

[root@ELK_001 elasticsearch-head]# grunt server

ELK 实验(七)Elasticsearch 集群管理

有文件头

curl -i localhost:9100

ELK 实验(七)Elasticsearch 集群管理

http://192.168.209.168:9100/

ELK 实验(七)Elasticsearch 集群管理

但是集群显示未连接

vi /usr/elasticsearch-6.2.3/config/elasticsearch.yml

http.cors.enabled: true

http.cors.allow-origin: "*"

加两句在启动下就好了

ELK 实验(七)Elasticsearch 集群管理

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI