Centos7 安装 elasticsearch-head
1、下载elasticsearch-head和nodejs
1.1
安装nodejs
官方下载
https://nodejs.org/en/download/
百度云下载
链接:https://pan.baidu.com/s/1S1oGEd0vPNck1AEhVYA-pg
提取码:49ss
解压:
tar xf node-v12.18.2-linux-x64.tar.xz
做2个软连接:
ln -s /root/node-v12.18.2-linux-x64/bin/node /usr/bin/node
ln -s /root/node-v12.18.2-linux-x64/bin/npm /usr/bin/npm
1.2
elasticsearch 5.0 之后,elasticsearch-head不做为插件放在其plugins目录下。使用git拷贝elasticsearch-head到本地
git下载
git clone git://github.com/mobz/elasticsearch-head.git
百度云下载
链接:https://pan.baidu.com/s/10A4G0av-lA1LSN7dMFf7Zg
提取码:rzwl
安装 grunt
npm install -g grunt-cli
安装 elasticsearch-head 依赖的包
cd elasticsearch-head
npm install
2、修改hostname
修改 Gruntfile.js 在connect–>server–>options下面添加:hostname:’ ** ,允许所有IP可以访问
vim /root/elasticsearch-head/Gruntfile.js
修改默认连接地址
修改elasticsearch-head默认连接地址,改成你自己的es地址
cd /root/elasticsearch-head/_site
vim app.js
将4374行
this.base_uri = this.config.base_uri || this.prefs.get(“app-base_uri”) || “http://10.180.18.38:9200”;
修改es
想在界面上看到es集群信息,必须在elasticsearch.yml增加两项配置,重启es
打开elasticsearch 的配置文件 elasticsearch.yml 在末尾加上:
http.cors.enabled: true
http.cors.allow-origin: “*”
启动elasticesarch-head
cd /root/elasticsearch-head/ && nohup ./node_modules/grunt/bin/grunt server &
访问 http://ip:9111(vim /root/elasticsearch-head/Gruntfile.js这个配置修改访问IP)
本文地址:https://blog.csdn.net/a13568hki/article/details/107319223
推荐阅读
-
Linux中安装Python的交互式解释器IPython的教程
-
java下载网址官网(java下载安装教程)
-
rpm安装jdk需要配置变量不(观文一览其配置安装要求)
-
安装sqlserver2000时出现wowexec.exe无反应的解决方法
-
垃圾引用防治补丁以及发送引用修正补丁的自动安装程序
-
kafka与storm集群环境的安装步骤详解
-
hypack怎么安装?hypack max2018破解版安装激活图文详细教程
-
Win10系统中怎么安装Android Studio软件?
-
sql server 2008怎么安装?sql server 2008安装视频教程
-
农村户户通(大锅盖)安装和调试的详细步骤