之所以要记录下,因为过程中遇到很多问题,现在终于解决,结果如下图

es最新软件软件包可在官方网站下载:https://www.elastic.co/downloads/elasticsearch
下载完tar zxvf 解压缩
然后进bin目录./elasticsearch 执行,都没有问题。但是这是IP地址后竟然运行不起来,报错如下
the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
修改elasticsearch.yml的IP后,再修改文件几处 ,就可以了,如下:
cluster.initial_master_nodes: ["node-1"] 这里一定要这样设置,我就是这里没有这样设置出问题的,弄了好久
在最后加上这两句,要不然,外面浏览器就访问不了哈
http.cors.enabled: true
http.cors.allow-origin: "*"
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about

在CentOS上安装Elasticsearch时,从官网下载软件包并解压后,直接运行遇到IP配置问题导致无法启动。通过修改`elasticsearch.yml`文件,设置`cluster.initial_master_nodes`为`["node-1"]`,并开启HTTP CORS配置,即`http.cors.enabled: true`和`http.cors.allow-origin: "*"`,解决了启动及外部访问问题。
最低0.47元/天 解锁文章
1948

被折叠的 条评论
为什么被折叠?



