您好,登錄后才能下訂單哦!
? ---Elasticsearch 分布式安裝步驟
考慮需要安裝elasticsearch-head作為web展示 所以首先安裝nodejs 主要是利用npm
wget https://npm.taobao.org/mirrors/node/v11.0.0/node-v11.0.0.tar.gz
tar –zxvf node-v11.0.0.tar.gz
cd node-v11.0.0
yum install gcc gcc-c++
./configure
Make
Make install
開(kāi)始安裝elasticsearch
1. 安裝3臺(tái)虛擬機(jī)
2. 安裝jdk
解壓 tar –zxvf elasticsearch7.2.2
切換用戶 su cm(elasticsearch 不能在root用戶下啟動(dòng))
a) 修改config/elasticsearch.yml
cluster.name: es-app #集群名稱,可以自行修改
node.name: es-1 #節(jié)點(diǎn)名稱,自行修改
network.host: 192.168.235.133 #主機(jī)地址,這里寫本機(jī)IP
http.port: 9200 #端口
http.cors.enabled: true #設(shè)置跨域
http.cors.allow-origin: "*" #設(shè)置訪問(wèn)
b) 再啟動(dòng)查看不能啟動(dòng)原因
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
? i. 問(wèn)題 1 系統(tǒng)最大文件數(shù)太低
修改 vi /etc/security/limits.conf 文件末尾追加
cm soft nofile 65536
cm hard nofile 131072
cm soft nproc 4096
cm hard nproc 4096
? ii. 問(wèn)題 2 虛擬內(nèi)存太低
修改vi /etc/sysctl.conf文件末尾追加
? vm.max_map_count=655360
切換到root權(quán)限
? sysctl -p
? iii. java.nio.file.AccessDeniedException: …/elasticsearch-6.2.2/config/jvm.options
chown 用戶名 elasticsearch-6.2.2安裝目錄路徑 -R
a) tar –zxvf elasticsearch-head-master
b) npm install
c) npm run start
cluster.name: es-app #集群名稱,可以自行修改
node.name: es-2 #節(jié)點(diǎn)名稱,自行修改
network.host: 192.168.235.132 #主機(jī)地址,這里寫本機(jī)IP
http.port: 9200 #端口
discovery.zen.ping.unicast.hosts: ["192.168.235.133"]#設(shè)置集群的指揮
開(kāi)始安裝LogStash
nodejs文件是c編寫的,需要先yum install gcc gcc-c++
然后直接make進(jìn)行編譯nodejs文件
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。