<blockquote class="success">elasticsearch-head</blockquote>
```
elasticsearch-head是一款專門針對于elasticsearch的客戶端工具
```
### 一、安裝前準備
[1、centos7安裝git](http://www.cnblogs.com/subendong/p/7667443.html)
[2、centos7安裝nodejs](http://www.cnblogs.com/subendong/p/7667496.html)
>sudo yum install nodejs
### 二、elasticsearch-head安裝
```
1、使用git拷貝elasticsearch-head到本地
cd /usr/local/
git clone git://github.com/mobz/elasticsearch-head.git
或者 unzip elasticsearch-head-master.zip -d /usr/local/elasticsearch-head/
2、安裝elasticsearch-head依賴包
cd /usr/local/elasticsearch-head/
npm install
3、修改Gruntfile.js
cd /usr/local/elasticsearch-head/
vim Gruntfile.js
在connect-->server-->options下面添加:hostname:’*’,允許所有IP可以訪問
```

```
4、修改elasticsearch-head默認連接地址
cd /usr/local/elasticsearch-head/_site/
vim app.js
將this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";中的localhost修改成你es的服務器地址
5、配置elasticsearch允許跨域訪問
進入elasticsearch服務器,打開elasticsearch的配置文件elasticsearch.yml,在文件末尾追加下面兩行代碼即可:
http.cors.enabled: true
http.cors.allow-origin: "*"
6、打開9100端口
如果想在別的機器上訪問,防火墻必須開啟9100端口,永久打開9100端口
firewall-cmd --zone=public --add-port=9100/tcp --permanent
firewall-cmd --reload
7、 啟動elasticsearch-head
cd /usr/local/elasticsearch-head/
node_modules/grunt/bin/grunt server
8、后臺啟動
cd /usr/local/elasticsearch-head/
nohup npm run start >/usr/local/elasticsearch-head/nohup.out 2>&1 &
9、啟動、停止 head
查看 9100 (head 端口)端口:
lsof -i:9100
殺死進程:
kill -9 pid
添加到開啟自啟:
chmod +x elasticsearch-head # 賦予權限
chkconfig --add elasticsearch-head
測試:
service elasticsearch-head start
Ok,查看進程:
```


- 前言
- Markdown教程
- ElasticSearch教程
- ElasticSearch7.6.2安裝
- Elasticsearch-head安裝
- Elasticsearch-IK中文分詞器
- ElasticSearch基礎入門
- 索引管理
- ElasticSearch深入搜索
- 結構化搜索
- 精確值查找
- 組合過濾器
- 范圍查詢
- 全文搜索
- 匹配查詢
- 組合查詢
- 跨度查詢
- Logstash教程
- Logstash的安裝
- Mysql數據同步到ES
- Kibana教程
- Kibana7.6.2安裝
- Cakephp4.x+ElasticSearch7.6.2
- Cakephp4.x的安裝和使用
- Elasticsearch-phpSDK的使用
- 安裝軟件及源碼下載
- 使用總結
- elasticsearch 7.2集群安裝部署
- 集群的安裝部署
- es集群master節點配置組合
- 分片數、副本數分配算法
- 關于集群部署的答疑解惑