centos7安裝Elasticsearch7


  1.下載Elasticsearch7

   直接去官網下載.可慢了.下載了一個小時才下完.

  2.下載完了解壓壓縮包

tar -zxvf xxxx

  3.移動目錄

mv elasticsearch-7.2.0   /usr/local/

  3.新建一個用戶,es不讓你用root.

useradd  es
passwd es 
chown -R  es elasticsearch-7.2.0
4.修改配置文件
vim config/elasticsearch.yml
#修改為自己的ip
network.host: x.x.x.x
#把這個注釋先放開
cluster.initial_master_nodes: ["node-1", "node-2"]

 5.啟動

./elasticsearch

6.錯誤解決,如果出現以下錯誤.

[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 configured

 

vim /etc/security/limits.conf
*               soft    nofile          65536
*               hard    nofile          65536
*               soft    nproc           4096
*               hard    nproc           4096
 
vi /etc/sysctl.conf
vm.max_map_count=262144
sysctl -p
至此可以啟動了.



免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM