最近自己找了三臺(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

(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)修改-Xms與Xmx
(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版本過低的異常

建議使用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