溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

大數(shù)據(jù)之五:ELK安裝

發(fā)布時(shí)間:2020-08-14 20:59:34 來(lái)源:網(wǎng)絡(luò) 閱讀:213 作者:wx5d66921cb1eb1 欄目:大數(shù)據(jù)

大數(shù)據(jù)開(kāi)發(fā)卷五

? ---Elasticsearch 分布式安裝步驟

考慮需要安裝elasticsearch-head作為web展示 所以首先安裝nodejs 主要是利用npm

  1. wget https://npm.taobao.org/mirrors/node/v11.0.0/node-v11.0.0.tar.gz

  2. tar –zxvf node-v11.0.0.tar.gz

  3. cd node-v11.0.0

  4. yum install gcc gcc-c++

  5. ./configure

  6. Make

  7. Make install

  8. Node –v

開(kāi)始安裝elasticsearch

1. 安裝3臺(tái)虛擬機(jī)

2. 安裝jdk

  1. 解壓 tar –zxvf elasticsearch7.2.2

  2. 切換用戶 su cm(elasticsearch 不能在root用戶下啟動(dòng))

  3. 啟動(dòng)后宿主機(jī)不能訪問(wèn)處理方案(啟動(dòng)命令:在bin目錄下 sh elasticsearch)

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

  1. 可以先安裝elasticsearch-head監(jiān)控elasticsearch集群環(huán)境

a) tar –zxvf elasticsearch-head-master

b) npm install

c) npm run start

  1. 配置從節(jié)點(diǎn)服務(wù)器

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è)置集群的指揮

  1. 同理配置第3節(jié)點(diǎn)

開(kāi)始安裝LogStash

nodejs文件是c編寫的,需要先yum install gcc gcc-c++

然后直接make進(jìn)行編譯nodejs文件

大數(shù)據(jù)之五:ELK安裝

大數(shù)據(jù)之五:ELK安裝

大數(shù)據(jù)之五:ELK安裝

向AI問(wèn)一下細(xì)節(jié)

免責(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)容。

AI