首页 > 代码库 > elasticsearch 5.4 安装

elasticsearch 5.4 安装

elasticsearch 5.4 安装

1. 下载并解压
https://www.elastic.co/downloads/elasticsearch
tar -xvf elasticsearch-5.4.1.tar.gz

2. 配置config/elasticsearch.yml
cluster.name: yinjq-application
node.name: node-1
#索引存储位置
path.data: ~/es/data
#日志存储位置
path.logs: ~/es/logs
network.host: localhost
http.port: 9200
discovery.zen.ping.unicast.hosts: ["localhost"]
discovery.zen.minimum_master_nodes: 1
gateway.recover_after_nodes: 1
#head可以跨域访问
http.cors.enabled: true
http.cors.allow-origin: "*"

3. 启动
./bin/elasticsearch


elasticsearch-head 安装

5.x之后, head是一个单独server运行, 依赖于nodejs,npm,因此需要先装好nodejs,npm

1. 下载并解压
https://github.com/mobz/elasticsearch-head
unzip elasticsearch-head-master.zip

2. 安装
这个在git的网站上写的很详细
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
npm run start
open http://localhost:9100/
输入ES的集群 环境 http://localhost:9200/ ,点击链接即可.

 

elasticsearch 5.4 安装