|NO.Z.00004|——————————|Deployment|——|Hadoop&ElasticSearch集中式日志分析系统.v04|——|Elasticsearch.v04|ElasticSearch-head插件部署.V1|

一、安装elasticsearch-head插件
### --- Elasticsearch Head插件介绍及安装和验证主从环境

~~~     Elasticsearch Head插件介绍及安装
### --- elasticsearch-head 简介

~~~     elasticsearch-head是一个界面化的集群操作和管理工具,可以对集群进行傻瓜式操作。
~~~     你可以通过插件把它集成到ES。
### --- es-head主要有三个方面的操作:

~~~     显示集群的拓扑 能够快速访问并显示集群的状态,并且能够执行索引和节点级别操作
~~~     搜索接口能够查询集群中原始json或表格格式的检索数据
~~~     有一个输入窗口,允许任意调用RESTful API。
~~~     官方的文档: <https://github.com/mobz/elasticsearch-head>elasticsearch-head 安装
### --- elasticsearch-head插件安装步骤

~~~     ealsticsearch只是后端提供各种api,那么怎么直观的使用它呢?
~~~     elasticsearch-head将是一款专门针对于elasticsearch的客户端工具 elasticsearch-head配置包,
~~~     下载地址:https://github.com/mobz/elasticsearch-headelasticsearch-head是一个
~~~     基于node.js的前端工程。
~~~     以下步骤须使用root用户操作!!
~~~     # 此实验使用谷歌浏览器插件的形式部署,该环境不部署

二、elasticsearch-head插件安装步骤:安装nodejs服务
### --- 安装nodejs服务

~~~     # 下载nodejs版本包
[root@hadoop02 ~]#  wget -c https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.xz
~~~     # 解压版本包
[root@hadoop02 ~]# tar -zxvf node-v10.15.3-linux-x64.tar.xz -C ../servers/es
 
~~~     # 执行node命令,查看nodejs版本
[root@hadoop02 ~]# /opt/yanqi/servers/es/node-v10.15.3-linux-x64/bin/node -v
~~~输出参数
v10.15.3
~~~     # 解压文件的 bin 目录底下包含了 node、npm 等命令,我们可以使用 ln 命令来设置软连接:

[root@hadoop02 ~]# ln -s /opt/yanqi/servers/es/node-v10.15.3-linux-x64/bin/npm /usr/local/bin/
[root@hadoop02 ~]# ln -s /opt/yanqi/servers/es/node-v10.15.3-linux-x64/bin/node /usr/local/bin/
三、elasticsearch-head插件安装步骤:phantomjs服务安装
### --- phantomjs服务安装

~~~     # 下载phantomjs版本包
[root@hadoop02 ~]# wget -c https://github.com/Medium/phantomjs/archive/refs/tags/2.1.14.tar.gz
~~~     # 安装phantomjs服务

[root@hadoop02 ~]# yum install -y bzip2
[root@hadoop02 software]# tar -jxvf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C ../servers/
~~~     # 配置系统环境变量

[root@hadoop02 ~]#  vim /etc/profile
~~~     # 注意环境变量$Path移动在最前面
export PATH=$PATH:/opt/yanqi/servers/phantomjs-2.1.1-linux-x86_64/bin
~~~     # 使环境变量生效

[root@hadoop02 ~]# source /etc/profile
四、elasticsearch-head插件安装步骤:elasticsearch-head服务安装
### --- elasticsearch-head安装

~~~     # 使用npm包管理工具安装版本包
[root@hadoop02 ~]# npm install -g grunt-cli
[root@hadoop02 ~]# npm install grunt
[root@hadoop02 ~]# npm install grunt-contrib-clean
[root@hadoop02 ~]# npm install grunt-contrib-concat
[root@hadoop02 ~]# npm install grunt-contrib-watch
[root@hadoop02 ~]# npm install grunt-contrib-connect
[root@hadoop02 ~]# yum -y install git
~~~     # 下载elasticsearch-head版本包并安装

[root@hadoop02 ~]# cd /opt/yanqi/servers/es/elasticsearch-head
 
[root@hadoop02 elasticsearch-head]# git clone git://github.com/mobz/elasticsearch-head.git
[root@hadoop02 elasticsearch-head]# npm install -g cnpm --registry=https://registry.npm.taobao.org
### --- elasticsearch-head发现主机 并连接 elasticsearch.yml配置文件修改:

~~~     # 如果之前设置过 可以忽略这一步
[root@hadoop02 ~]# vim /opt/yanqi/servers/es/elasticsearch/config/elasticsearch.yml
~~~     # 最后两行写入如下参数
http.cors.enabled: true
http.cors.allow-origin: "*"
五、启动
### --- 在 elasticsearch-head 中执行命令
### --- 启动完成后,我们用Elasticsearch head查看,主从环境配置正常。

~~~     # 启动es服务:注意:如果启动出错 则把第三步中的依赖再安装一遍!!
[root@hadoop02 elasticsearch-head]#  npm run start


 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

posted on   yanqi_vip  阅读(18)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示