ElasticSearch、Kibana Setup

最近自己找了三臺(tái)測(cè)試服務(wù)器學(xué)著裝了es。記錄一下安裝過程。

ElasticSearch

一、下載安裝

(1) 下載

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-x86_64.rpm

(2)

sudo rpm --install elasticsearch-7.6.2-x86_64.rpm

默認(rèn)路徑/etc/elasticsearch/

二、配置

3、可能出現(xiàn)的問題

(1)max number of threads [1024] for user [elasticsearch] is too low, increase to at least [4096]

vim /etc/security/limits.d/90-nproc.conf


image.png

(2)max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

vim /etc/sysctl.conf
添加vm.max_map_count=262144

(3)【CENTOS6才會(huì)】system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

在es.yml中添加
bootstrap.system_call_filter: false

(4)ERROR: bootstrap checks failed memory locking requested for elasticsearch process but memory is not locked

vim /etc/security/limits.conf
添加
* soft memlock unlimited 
* hard memlock unlimited
4、配置文件修改
cluster.name: test-cluster
node.name: [HOSTNAME]
path.data: /cache1/elasticsearch/data
path.logs: /cache1/elasticsearch/logs
network.host: 0.0.0.0
node.master: true
node.data: true
http.port: [PORT]
bootstrap.memory_lock: true

第一臺(tái)啟動(dòng)的機(jī)器配置

cluster.initial_master_nodes: ["HOSTNAME"]

其他加入的機(jī)器配置

discovery.seed_hosts: ["[MASTER-ELIGIBLE IP]"]
5、修改jvm配置

修改jvm.options
(1)修改-XmsXmx
(2)修改gc文件配置(默認(rèn)是在es路徑的logs下)

6、關(guān)閉swap

edit the /etc/fstab file and comment out any lines that contain the word swap.

7、修改文件句柄數(shù)

Kinana

一、centos version

如果是centos6,會(huì)有一個(gè)glibc版本過低的異常


image.png

建議使用rpm方式安裝。本次也是使用rpm方式安裝。

二、安裝

1、下載
wget https://artifacts.elastic.co/downloads/kibana/kibana-7.6.2-x86_64.rpm
2、安裝
sudo rpm --install kibana-7.6.2-x86_64.rpm
3、default path
  • 默認(rèn)配置文件地址:/etc/kibana
  • 默認(rèn)日志地址:/var/log/kibana
4、配置修改

修改配置文件kibana.yml

server.port: 5601 // kibana端口
server.host: 0.0.0.0 // 對(duì)外暴露
elasticsearch.hosts: ["http://localhost:port"] // es的地址
5、command

service kibana start/stop/status

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

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