ElasticSearch6.x安裝、ElasticSearch head外掛
一.安裝Elasticsearch
1. 安裝jdk1.8環境,安裝過程忽略
2. 下載最新Elasticsearch 6.3.0
下載地址請下載詳細文件: https://download.csdn.net/download/cowbin2012/10729506
3. 安裝Elasticsearch
rpm -ivh elasticsearch-6.3.0.rpm
專案所在:/usr/share/elasticsearch
4.修改配置檔案
[[email protected]]# vi /etc/elasticsearch/elasticsearch.yml
network.host: 0.0.0.0
http.post: 9200 #設定埠號
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
http.cors.enabled: true
http.cors.allow-origin: "*"
5.啟動
service elasticsearch start
二.安裝ElasticSearch head外掛
1. 安裝NodeJS
wget node.tar.gz
下載地址請下載詳細文件: https://download.csdn.net/download/cowbin2012/10729506
配置下環境變數,編輯/etc/profile新增
配置請檢視詳細文件: https://download.csdn.net/download/cowbin2012/10729506
執行 source /etc/profile
2.安裝npm
配置請檢視詳細文件: https://download.csdn.net/download/cowbin2012/10729506
也可以在別的地方下載後上傳到伺服器
master.zip
[[email protected] ~]$ unzip master.zip
3.下載依賴
進入elasticsearch-head-master目錄,執行下面命令
[[email protected] elasticsearch-head-master]$ npm install
修改Head外掛配置檔案
[[email protected] elasticsearch-head-master]$ vi Gruntfile.js
找到connect:server,新增hostname一項,如下
connect: {
server: {
options: {
hostname: '0.0.0.0',
port: 9100,
base: '.',
keepalive: true
}
}
}
4.啟動head
通過命令grunt server啟動head
[[email protected] elasticsearch-head-master]$ grunt server
需要在head的目錄下執行
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://node1:9100
三.啟動錯誤
檢視詳細文件: https://download.csdn.net/download/cowbin2012/10729506
bootstrap.memory_lock: false
bootstrap.system_call_filter: false