当前位置:网站首页>Fast build elk7.3
Fast build elk7.3
2022-06-11 11:44:00 【Rufeng】
A quick start guild of ELK 7.3.2, including package installation and simple test.
ok , It was before the discovery Quickly build ELK7.2 There are some pits , Decide to do it again .
The installation version has some advantages over the direct decompression version , At least after installation Service, Save a lot of trouble on the command line .
Download and install
- https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.2-x86_64.rpm
- https://artifacts.elastic.co/downloads/kibana/kibana-7.3.2-x86_64.rpm
- https://artifacts.elastic.co/downloads/logstash/logstash-7.3.2.rpm
- https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.3.2-x86_64.rpm
- https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-7.3.2-x86_64.rpm
https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-elastic-stack.html
Elasticsearch
Install
$ sudo rpm -ivh elasticsearch-7.3.2-x86_64.rpm
warning: elasticsearch-7.3.2-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
Preparing... ################################# [100%]
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Updating / installing...
1:elasticsearch-0:7.3.2-1 ################################# [100%]
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
sudo systemctl start elasticsearch.service
Created elasticsearch keystore in /etc/elasticsearch
Startup
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
sudo systemctl status elasticsearch.service
sudo systemctl start elasticsearch.service
### Check process
# ps -ef|grep ela
### Check installed files location
# sudo rpm -ql elasticsearch
Test
$ curl localhost:9200
{
"name" : "appserver01",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "wCDlDy6UTriUSuZuDrqWrw",
"version" : {
"number" : "7.3.2",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "1c1faf1",
"build_date" : "2019-09-06T14:40:30.409026Z",
"build_snapshot" : false,
"lucene_version" : "8.1.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Startup Commands
All other installations are similar, you can find the services list as below.
sudo systemctl start elasticsearch.service
sudo systemctl start kibana.service
sudo systemctl start logstash.service
sudo systemctl start filebeat.service
sudo systemctl start heartbeat-elastic.service
Remote Access to Elasticsearch
sudo vi /etc/elasticsearch/elasticsearch.yml
#network.host: 192.168.0.1
network.host: 0.0.0.0
cluster.initial_master_nodes: node-1
The last configure change is for bootstrap error below.
sudo tail /var/log/elasticsearch/elasticsearch.log
[2019-10-10T10:06:24,340][ERROR][o.e.b.Bootstrap ] [appserver01] node validation exception
[1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
I haven't met 7.2 Decompression version Inside vm.max_map_count is too low The problem of .
Take a cursory look at , It is put into the boot script In the .
sudo view /etc/init.d/elasticsearch
MAX_OPEN_FILES=65535
MAX_MAP_COUNT=262144
sysctl -q -w vm.max_map_count=$MAX_MAP_COUNT
Remote Access to Kibana
# curl localhost:5601
# curl localhost:5601/app/kibana
sudo vi /etc/kibana/kibana.yml
#server.host: "localhost"
server.host: "0.0.0.0"
sudo systemctl restart kibana.service
Now Kibana can be accessed from another host browser
http://192.168.1.88:5601/
Installation path problem
At first, try to install it into the specified directory , But I found that after loading Service The path in the has not been changed , Explain that some manual work is required , Still don't bother .
$ sudo rpm -ivh --prefix=/opt/elk elasticsearch-7.3.2-x86_64.rpm
warning: elasticsearch-7.3.2-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
Preparing... ################################# [100%]
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Updating / installing...
1:elasticsearch-0:7.3.2-1 ################################# [100%]
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
sudo systemctl start elasticsearch.service
/var/tmp/rpm-tmp.JyvHeM: line 8: /usr/share/elasticsearch/bin/elasticsearch-keystore: No such file or directory
chown: cannot access ‘/etc/elasticsearch/elasticsearch.keystore’: No such file or directory
chmod: cannot access ‘/etc/elasticsearch/elasticsearch.keystore’: No such file or directory
md5sum: /etc/elasticsearch/elasticsearch.keystore: No such file or directory
warning: %posttrans(elasticsearch-0:7.3.2-1.x86_64) scriptlet failed, exit status 1
Re installation issues
Because there was an old version in the machine ELK, reinstall Elasticsearch I found that I couldn't start .
It is said on the Internet that there is already one running , But I didn't find it here .
Finally, the problem was solved again , Before reloading, delete all the files in the relevant path .
failed to obtain node locks
Failed to startup Elasticsearch with below error.
[2019-09-23T16:41:39,751][ERROR][o.e.b.Bootstrap ] [appserver01] Exception
java.lang.IllegalStateException: failed to obtain node locks, tried [[/var/lib/elasticsearch]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
Not work even after nodes configure is updated as below.
node.max_local_storage_nodes: 2
The issue was solved after removing all related folders, and we also added CPU and memory (reboot) during the period.
Maybe the files were not cleaned up in the related folders when uninstalled old version.
$ sudo rpm -ql elasticsearch>elasticsearch_pkg.log
$ sudo rpm -ev elasticsearch
Preparing packages...
Stopping elasticsearch service... OK
elasticsearch-0:5.4.0-1.noarch
Deleting log directory... OK
$ sudo rpm -ql elasticsearch
package elasticsearch is not installed
find / -iname "elasticsearch"
Remove all old version files found.
sudo rm -rf /usr/share/elasticsearch
sudo rm -rf /etc/elasticsearch
sudo rm -rf /var/log/elasticsearch
sudo rm -rf /var/lib/elasticsearch
边栏推荐
- How to understand CPU load
- ELK - ElastAlert最大的坑
- Where is it safer to open an account for soda ash futures? How much capital is needed to trade soda ash futures at present?
- 修改 WordPress 管理账号名称插件:Admin renamer extended
- It will be too late if you don't brush the questions. The most complete bat interview questions
- JS addition and multiplication error resolution number precision
- nft数字藏品系统开发搭建流程
- CPU负载怎么理解
- 拆分数据---水平拆分和纵向拆分
- 普通人应当如何挑选年金险产品?
猜你喜欢

How does Sister Feng change to ice?
![my.cnf中 [mysql]与[mysqld] 的区别 引起的binlog启动失败的问题](/img/bd/a28e74654c7821b3a9cd9260d2e399.png)
my.cnf中 [mysql]与[mysqld] 的区别 引起的binlog启动失败的问题

浙大联合微软亚研院发布视频识别新方法,可对视频逐帧识别且无需,数据标记,或可用于手语翻译等

Lifeifei: I am more like a scientist in physics than an engineer

Only when you find your own advantages can you work tirelessly and get twice the result with half the effort!

It will be too late if you don't brush the questions. The most complete bat interview questions

再不刷题就晚了,最全的BAT大厂面试题整理
![Set the default receiving address [project mall]](/img/eb/2864b124b66d01849315a367948ed4.png)
Set the default receiving address [project mall]

ELK - Hearthbeat实现服务监控

2022 | framework for Android interview -- Analysis of the core principles of binder, handler, WMS and AMS!
随机推荐
[第二章 基因和染色体的关系]生物知识概括–高一生物
Streaking? Baa!
苹果MobileOne: 移动端仅需1ms的高性能骨干
JS 加法乘法错误解决 number-precision
The role of Gerber file in PCB manufacturing
How should ordinary people choose annuity insurance products?
JS merge two objects (interview questions)
web开发选型,web开发毕业谁
Typescript compilation options and configuration files
How to understand CPU load
Learning in Bi design 03
推荐几款Gravatar头像缓存插件
WordPress用户名修改插件:Username Changer
Interview experience of Xiaomi Android development post~
木瓜移动CFO刘凡 释放数字时代女性创新力量
Bark – 自己给自己的 iPhone 发推送提醒 – 最简单的推送提醒服务,开源免费
灵动边栏(Widget)插件:MO Widgets
WordPress数据库缓存插件:DB Cache Reloaded
设置默认收货地址【项目 商城】
WordPress regenerate featured image plugin: regenerate thumbnails