Elasticsearch Head Plugin 详细安装教程
Elasticsearch Head Plugin站点插件可以以网页形式展现ES
-
注意:这个插件依赖于nodejs,phantomjs所以我们在安装插件之前需要安装nodejs以及grunt
-
nodejs下载地址https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.xz
- 复制此链接就可以直接下或者https://nodejs.org/dist 使用这个两节找适合自己的版本
-
因为此文件是.tar.xz,所以需要先使用xz解压在使用tar解压 如果解压xz的命令不存在就需要使用yum进行下载 yum -y install xz
-
解压: xz -d node-v10.15.3-linux-x64.tar.xz tar -xvf node-v10.15.3-linux-x64.tar
-
创建软连接
-
ln -s /data/soft/node-v10.15.3-linux-x64/bin/node /usr/bin/node ln -s /data/soft/node-v10.15.3-linux-x64/bin/npm /usr/bin/npm
-
设定nodejs安装软件的dialing服务器
-
npm config set registry https://registry.npm.taobao.org
-
安装grunt
-
npm install -g grunt npm install -g grunt-cli
-
创建软连接
-
ln -s /data/soft/node-v10.15.3-linux-x64/bin/grunt /usr/bin/grunt
-
安装phantomjs
- 下载地址http://phantomjs.org/download.html
-
解压
-
bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2 tar -xvf phantomjs-2.1.1-linux-x86_64.tar
-
创建软连接
-
ln -s /data/soft/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
-
安装依赖软件
-
yum -y install wget fontconfig
-
-
安装head插件
-
下载地址:https://github.com/mobz/elasticsearch-head/archive/master.zip
-
解压 需要使用unzip命令
-
下载unzip
-
yum install -y unzip
-
解压
-
unzip elasticsearch-head-master.zip
-
然后cd进入到解压的文件中
-
安装两个插件
-
npm audit fix npm audit fix --force
-
执行安装命令安装head
-
sudo npm install
-
启动之前修改Gruntfile.js文件,增加hostname参数
-
vi Gruntfile.js options: { hostname: 'hadoop100', port: 9101, base: '.', keepalive: true }
-
启动服务
-
grunt Server
-
启动服务后还需要修改Elasticsearch中的一些配置
-
vi config/elasticsearch.yml http.cors.enabled: true http.cors.allow-origin: "*"
-
修改完成后重启ES
-
进入网址http://hadoop100:9101/可以看到以下信息就说明插件安装成功了
-
-