您的位置:首页 > 其它

31 原 Mac 安装Elasticsearch 5.0

2016-12-24 14:15 531 查看


Install Elasticsearch 5.0

Download .zip/.tar.gz 下载地址

tar -xzf elasticsearch-5.0.0.tar.gz

修改配置文件(xx/config/elasticsearch.yml): 

path.data:/data/elasticsearch/data #数据目录

path.logs:/data/elasticsearch/logs #日志目录

network.host:x.x.x.x

http.cors.enabled:true #这个参数设置head插件连接es集群

http.cors.allow-origin:”*” #同上(如果不设置最后这两个参数head插件连接不到es集群)

启动es,nohup bin/elasticsearch > logs/xxx.log 2>&1 &


Install elasticsearch-head(es5.0不支持site plugin,所以需要单独安装head插件)

elasticsearch-head

enable cors by adding http.cors.enabled: true in elasticsearch configuration. Don’t forget to also set 

http.cors.allow-origin because no origin allowed by default. http.cors.allow-origin: “*” is valid value, however it’s considered as a security risk as your cluster is open to cross origin from anywhere. Check
Elasticsearch documentation on this parameter

git clone git://github.com/mobz/elasticsearch-head.git

cd elasticsearch-head

npm install

grunt server(如果没有grunt,执行npm install -g grunt-cli安装)

open http://localhost:9100/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: