CentOS7安装elasticsearch-head
今天在安装elasticsearch-head的时候,需要用到npm环境,因此通过yum安装了一个npm,这里把遇到的问题和坑都记录一下。
elasticsearch-head的github地址:https://github.com/mobz/elasticsearch-head
1、操作系统版本
[root@elk01 ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core)
2、安装启动elasticsearch-head
方法1:通过源码编译安装
#安装epel源 yum -y install epel-release #安装npm、git客户端以及openssl yum -y install npm git openssl #克隆elasticsearch项目到本地 git clone git://github.com/mobz/elasticsearch-head.git cd elasticsearch-head #安装项目,这个过程需花费大量时间 npm install
#安装完成后,会生成一个node_modes的文件夹
[root@elk01 elasticsearch-head]# ls -ld node_modules/
drwxr-xr-x 374 root root 12288 Mar 5 23:38 node_modules/
#启动
npm run start &
方法2:通过docker容器启动
#安装docker服务 yum -y install docker #启动容器 docker run -p 9100:9100 mobz/elasticsearch-head:5
3、elasticsearch配置
需要在elasticsearch配置文件里面添加支持http访问的参数
vim /etc/elasticsearch/elasticsearch.yml
#在文件末尾增加如下内容
http.cors.enabled: true http.cors.allow-origin: "*"
4、浏览器访问
两种方法任选一种,安装完成后即可通过浏览器进行访问
http://localhost:9100/
安装过程中遇到的问题:
执行命令`npm install`的时候遇到报错如下:
npm: relocation error: npm: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.so.10 with link time reference
这是由于没有安装openssl导致的,因此需要事先安装好openssl!
作者:流光给给
来源链接:https://www.cnblogs.com/liuguangjiji/p/10480719.html
版权声明:
1、JavaClub(https://www.javaclub.cn)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。
2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。