ELK安装简记

下载 Elasticsearch

https://www.elastic.co/cn/downloads/elasticsearch

下载 Kibana

https://www.elastic.co/cn/downloads/kibana

下载 Filebeat

https://www.elastic.co/cn/downloads/beats/filebeat

下载 Logstash

https://www.elastic.co/cn/downloads/logstash

安装参考:

https://blog.csdn.net/weixin_41047933/article/details/82699823

Elk集群安装+配置(Elasticsearch+Logstash+Filebeat+Kafka+zookeeper+Kibana)

https://blog.csdn.net/fenglailea/article/details/52486471

ELKF(Elasticsearch+Logstash+ Kibana+ Filebeat) 部署

https://blog.csdn.net/dayi_123/article/details/78386731

elk安装及使用四(logstash的安装及使用)

安装过程不做赘述!参考上述链接。就说一下我安装过程中遇到的问题!

以在linux上安装为例~

一.安装Elasticsearch

1.Java 版本

必须安装1.8及以上,越高越好!不然它总会出现如下图情况,虽然对运行没影响,但看着很不爽~

2.用户及权限

root用户不能启动Elasticsearch!会报错!!!

java.lang.RuntimeException: can not run elasticsearch as root!!!!

[o.e.b.ElasticsearchUncaughtExceptionHandler] [node1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.3.2.jar:7.3.2]
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.3.2.jar:7.3.2]
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.3.2.jar:7.3.2]
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-7.3.2.jar:7.3.2]
    at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.3.2.jar:7.3.2]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.3.2.jar:7.3.2]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.3.2.jar:7.3.2]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
    at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:105) ~[elasticsearch-7.3.2.jar:7.3.2]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:172) ~[elasticsearch-7.3.2.jar:7.3.2]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.3.2.jar:7.3.2]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.3.2.jar:7.3.2]
    ... 6 more

所以~~

首先你要新建一个用户

参考https://blog.csdn.net/weixin_43113679/article/details/89263940

其次你要把Elasticsearch文件的操作权限给你新建的那个用户

参考https://www.cnblogs.com/h-c-g/articles/9931849.html

3.配置

一些重要的配置参考:https://www.cnblogs.com/ginb/p/7027910.html

4.版本

要和Kibana一样!!!

5.其他问题参照

https://blog.csdn.net/weixin_41047933/article/details/82699823。

二.安装Logstash,安装Filebeat,安装Kibana

把Elasticsearch安装好了,这三个安装过程都差不多。如果启动过程中遇见错误,十有八九是配置文件有问题!!

具体的问题视情况而定,当你把所有的都安装好后,试试能不能在Kibana获取到Filebeat产生的模板数据,如果能就说明你起码调通了它。

这只是开始!!针对不同的业务对它们进行不同的配置以实现不同的功能!!加油!!你一定行!!!反正我是放弃了~~~

你可能感兴趣的:(ELK安装简记)