[root@es01 ~]# ll el*
-rw-r--r--. 1 root root 317277408 Oct 13 13:37 elasticsearch-7.9.2-x86_64.rpm
-rw-r--r--. 1 root root 160 Oct 13 13:37 elasticsearch-7.9.2-x86_64.rpm.sha512
[root@es01 ~]# shasum -a 512 -c elasticsearch-7.9.2-x86_64.rpm.sha512
elasticsearch-7.9.2-x86_64.rpm: OK
[root@es01 ~]# rpm --install elasticsearch-7.9.2-x86_64.rpm
warning: elasticsearch-7.9.2-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
Creating elasticsearch group... OK
Creating elasticsearch user... OK
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemdsudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executingsudo systemctl start elasticsearch.service
Created elasticsearch keystore in /etc/elasticsearch/elasticsearch.keystore
[/usr/lib/tmpfiles.d/elasticsearch.conf:1] Line references path below legacy directory /var/run/, updating /var/run/elasticsearch → /run/elasticsearch; please update the tmpfiles.d/ drop-in file accordingly.
[root@es01 ~]# systemctl daemon-reload[root@es01 ~]#
配置文件
[root@es01 ~]# cp /etc/elasticsearch/elasticsearch.yml{,.bak}[root@es01 ~]# vi /etc/elasticsearch/elasticsearch.yml[root@es01 ~]# cat /etc/elasticsearch/elasticsearch.yml# Use a descriptive name for your cluster:
cluster.name: escluster
node.name: es01
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 13.13.13.5
http.port: 9200
# Pass an initial list of hosts to perform discovery when this node is started:
discovery.seed_hosts: ["13.13.13.5", "13.13.13.6", "13.13.13.7"]# Bootstrap the cluster using an initial set of master-eligible nodes:
cluster.initial_master_nodes: ["es01", "es02", "es03"][root@es01 ~]#