安装jdk
# wget https://download.oracle.com/java/18/latest/jdk-18_linux-x64_bin.rpm
# rpm -ivh jdk-18_linux-x64_bin.rpm
# java -version
下载es
# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.2-x86_64.rpm
scp到另外两台
# scp elasticsearch-8.3.2-x86_64.rpm 10.0.0.3:/root/
# scp elasticsearch-8.3.2-x86_64.rpm 10.0.0.7:/root/
安装es
# rpm -ivh elasticsearch-8.3.2-x86_64.rpm
编辑配置文件 另外两台修改node.name
# vim /etc/elasticsearch/elasticsearch.yml
# cat /etc/elasticsearch/elasticsearch.yml | grep -v '#' | grep -v '^$'
cluster.name: my-application
node.name: node-1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 10.0.0.14
http.port: 9200
discovery.seed_hosts: ["10.0.0.14", "10.0.0.3", "10.0.0.5"]
cluster.initial_master_nodes: ["10.0.0.14", "10.0.0.3", "10.0.0.5"]
xpack.security.enabled: false
xpack.security.enrollment.enabled: true
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
xpack.security.transport.ssl:
enabled: false
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
http.host: 0.0.0.0
启动es
systemctl restart elasticsearch.service
查看端口9200
netstat -tunlp | grep 9200
# curl 127.0.0.1:9200
![](https://img2022.cnblogs.com/blog/1204490/202207/1204490-20220729102957581-347349084.png)