elasticsearch 是一款日志搜索引擎,其安装配置如下:

安装软件

yum -y install elasticsearch-7.17.4-x86_64.rpm

修改配置

elasticsearch 默认配置文件的目录是 /etc/elasticsearch/elasticsearch.yml

vim /etc/elasticsearch/elasticsearch.yml
node.name: node-1
path.data: /var/lib/elasticsearch
path.logs: /var/logs/elasticsearch
network.host: 0.0.0.0
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"

启动服务

systemctl enable elasticsearch.service
ss -ntulp | grep java
tcp   LISTEN 0      128                *:9200             *:*    users:(("java",pid=603,fd=215))   
tcp   LISTEN 0      128                *:9300             *:*    users:(("java",pid=603,fd=201))

9200 是 elasticsearch 提供 web 访问的端口,而 9300 是 elasticsearch 集群通信使用的端口,默认也是开启的。


已注销
1 声望0 粉丝