版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhangvalue/article/details/89208715
在通过brew install elasticsearch 安装成功之后
启动 elasticsearch的时候出现了
ERROR: Cluster name [elasticsearch_zhangsf] subdirectory exists in data paths [/usr/local/var/lib/elasticsearch/elasticsearch_zhangsf]. All data under these paths must be moved up one directory to paths [/usr/local/var/lib/elasticsearch]
elasticsearch的config文件夹里面有两个配置文件:elasticsearch.yml和logging.yml,第一个是es的基本配置文件,第二个是日志配置文件
cd /usr/local/Cellar/elasticsearch/6.7.0/libexec/config
vim elasticsearch.yml
将elasticsearch.yml里面的
data.path由/usr/local/var/lib/elasticsearch
改为/usr/local/var/lib/elasticsearch/elasticsearch_zhangsf
再重新启动 elasticsearch就ok
扫描二维码关注公众号,回复:
5849051 查看本文章