今天在安裝elasticsearch-head的時候,須要用到npm環境,所以經過yum安裝了一個,這裏把遇到的問題和坑都記錄一下。
elasticsearch-head的github地址:https://github.com/mobz/elasticsearch-head
操做系統版本:git
[root@elk01 ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core)
安裝啓動elasticsearch-head:
方法1:經過源碼編譯安裝github
#安裝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
#安裝docker服務 yum -y install docker #啓動容器 docker run -p 9100:9100 mobz/elasticsearch-head:5
訪問地址: http://localhost:9100/npm
執行命令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!elasticsearch