ES cluster安裝

1.jdk安裝

cd /usr/java;
tar  -zxvf  jdk-8u131-linux-x64.tar.gz 

vim /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_131
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin
export PATH=$PATH:${JAVA_PATH}

2.es安裝

1.官網(wǎng)獲取下載鏈接,https://www.elastic.co/downloads/elasticsearch
2.解壓縮
3.修改es.yml配置

cluster.name: shark
node.name: node-1
path.data: /search/data
network.host: 0.0.0.0
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.146.x.32", "10.146.x.78","10.146.x.90"]
node.data: true
http.cors.enabled: true
http.cors.allow-origin: "*"

4.修改jvm配置
修改堆內(nèi)存大小為24G,不要超過32G,且不要超過本機的一半內(nèi)存

3.啟動

./bin/elasticsearch -d

4.錯誤處理

啟動報錯max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
修改 /etc/security/limits.conf中的 soft nofile和hard nofile值為65536

vi /etc/security/limits.conf
# End of file
### sat-set
*                soft   nofile          65536
*                hard   nofile          65536
*                soft   nproc           unlimited
*                hard   nproc           unlimited

啟動報錯[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

vi /etc/sysctl.conf
vm.max_map_count=262144
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容