在前面我们介绍了elasticsearch即ELK平台的安装,但是真实环境里面,我们使用elasticsearch的head插件的情况还是比较多的,因此我们这篇文章介绍下elasticsearch-head插件的安装。
一、下载elasticsearch
在很久以前的版本elasticsearch-head插件作为elasticsearch的一个插件,我们直接plugin install即可安装,但是后来慢慢的随着elasticsearch版本的更新升级,因此head插件慢慢的被独立出来,因此现在安装elasticsearch的话,需要单独去git上下载。
git下载地址是:https://github.com/mobz/elasticsearch-head
国内访问git地址比较慢,文末我们也有本插件的下载及注意事项。
二、把elasticsearch-head插件进行解压,这里我们是解压到/mnt目录下的
三、修改elasticsearch-head插件的配置
在elasticsearch-head插件里面文件比较多:
修改的第一个配置文件是Gruntfile.js这个文件,在里面找到这一块代码:
在第94行左右,这里我们把hostname修改为elasticsearch-head插件所在的服务器ip,访问端口是9100,如果服务器端口有冲突,则修改成其他端口即可。
四、启动elasticsearch-head插件
我们进入到elasticsearch-head-master目录下,使用如下命令即可启动elasticsearch-head插件
grunt server
此时我们访问elasticsearch-head插件的页面地址,例如:http://192.168.31.20:9100
然后我们在页面上填写我们需要连接的es信息即可
点击连接后,我们就可以看到对应的elasticsearch的信息了。
以上就是elasticsearch的安装教程,最后我们附上elasticsearch-head插件的下载地址及注意事项,登录后即可看到。
还没有评论,来说两句吧...