资源信息 | 版本号 | 备注 |
---|---|---|
服务器 | Centos7 | IP: 192.168.51.4 |
elasticsearch | 7.4.2 | IP: 192.168.51.4 |
Elasticsearch是一个基于Apache Lucene™的开源搜索引擎,无论在开源还是专有领域,Lucene可以被认为是迄今为止最先进、性能最好的、功能最全的搜索引擎库。
但是,Lucene只是一个库。想要发挥其强大的作用,你需使用Java并要将其集成到你的应用中。Lucene非常复杂,你需要深入的了解检索相关知识来理解它是如何工作的。
Elasticsearch也是使用Java编写并使用Lucene来建立索引并实现搜索功能,但是它的目的是通过简单连贯的RESTful API让全文搜索变得简单并隐藏Lucene的复杂性。
不过,Elasticsearch不仅仅是Lucene和全文搜索引擎,它还提供:
附上官网地址:https://www.elastic.co/cn/elasticsearch/
elasticsearch单机版的安装,可参考博文:
ES elasticsearch的安装和配置:https://blog.csdn.net/qq_15769939/article/details/114249211
[root@localhost logstash-7.4.2]# cd /usr/local/elasticsearch-7.4.2/bin
[root@localhost bin]# ./elasticsearch -d
future versions of Elasticsearch will require Java 11; your Java version from [/opt/module/haoke/jdk1.8.0_141/jre] does not meet this requirement
[root@localhost bin]# ./elasticsearch-certutil ca --pem
...
Please enter the desired output file [elastic-stack-ca.zip]:
[root@localhost bin]# unzip elastic-stack-ca.zip
Archive: elastic-stack-ca.zip
creating: ca/
inflating: ca/ca.crt
inflating: ca/ca.key
总用量 8
-rw-r--r--. 1 root root 1200 3月 27 19:43 ca.crt
-rw-r--r--. 1 root root 1679 3月 27 19:43 ca.key
[root@localhost bin]# ./elasticsearch-certutil cert --ca-cert ca/ca.crt --ca-key ca/ca.key --pem
[root@localhost bin]# unzip certificate-bundle.zip
[root@localhost bin]# cd /usr/local/elasticsearch-7.4.2/config
[root@localhost config]# mkdir x-pack
bin目录生成的ca和instance两个文件夹 拷贝至config下面的x-pack文件夹下
[root@localhost config]# vi elasticsearch.yml
最后添加如下代码:
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.ssl.key: x-pack/instance/instance.key
xpack.ssl.certificate: x-pack/instance/instance.crt
xpack.ssl.certificate_authorities: x-pack/ca/ca.crt
xpack.ssl.verification_mode: certificate
xpack.ssl.client_authentication: required
[root@localhost config]# jps
28696 Elasticsearch
29977 Jps
[root@localhost config]# kill 28696
[root@localhost bin]# cd /usr/local/elasticsearch-7.4.2/bin
[root@localhost bin]# ./elasticsearch -d
[root@localhost bin]# ./elasticsearch-setup-passwords interactive
future versions of Elasticsearch will require Java 11; your Java version from [/opt/module/haoke/jdk1.8.0_141/jre] does not meet this requirement
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y
Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [apm_system]:
Reenter password for [apm_system]:
Enter password for [kibana]:
Reenter password for [kibana]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Enter password for [remote_monitoring_user]:
Reenter password for [remote_monitoring_user]:
Changed password for user [apm_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]
第①篇:ELK 日志采集框架(一):架构设计
第②篇:ELK 日志采集框架(二):日志模块开发
第③篇:ELK 日志采集框架(三):Filebeat安装与配置
第④篇:ELK 日志采集框架(四):Kafka安装与配置
第⑤篇:ELK 日志采集框架(五):Logstash安装与配置
第⑥篇:ELK 日志采集框架(六):ElasticSearch安装与配置
第⑦篇:ELK 日志采集框架(七):Kibana安装与配置
第⑧篇:ELK 日志采集框架(八):功能测试与告警集成
博文不易,辛苦各位猿友点个关注和赞,感谢