1. 程式人生 > >CentOS7安裝elasticsearch-head

CentOS7安裝elasticsearch-head

執行命令 https sym cer 時間 cert -h git客戶端 hub

今天在安裝elasticsearch-head的時候,需要用到npm環境,因此通過yum安裝了一個,這裏把遇到的問題和坑都記錄一下。
elasticsearch-head的github地址:https://github.com/mobz/elasticsearch-head
操作系統版本:

[root@elk01 ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core)

安裝啟動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

#啟動
npm run start &

方法2:通過docker容器啟動

#安裝docker服務
yum -y install docker

#啟動容器
docker run -p 9100:9100 mobz/elasticsearch-head:5

訪問地址: 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!

CentOS7安裝elasticsearch-head