進入ElasticSearch安裝的config目錄
cd /home/es/config
vim elasticsearch.yml
cluster.name=es_cluster # 集羣名稱
node.name=hadhoop #集羣中的節點名稱
path.data=/home/es/es/data #索引數據庫的數據文件存在那個路徑下面
path.logs=/home/es/es/logs #日誌文件存儲路徑
network.host=192.168.180.128 #當前虛擬機ip的別名
http.cors.enabled: true
http.cors.allow-origin: "*" #允許外部客戶端訪問es
啓動
./elasticsearch
ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[3]: 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 conf
參考文章
https://www.2cto.com/database/201807/758838.html
https://cloud.tencent.com/developer/article/1469924
https://blog.csdn.net/qq_36608921/article/details/92803959
解決掉三個報錯問題
到這裏說明配置文件版es正常啓動