一、导入Elasticsearch PGP Key
We sign all of our packages with the Elasticsearch Signing Key (PGP key D88E42B4
4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4
Download and install the public signing key:
rpm --import
二、部署仓库 RPM repository
Create a file called elasticsearch.repo
in the /etc/yum.repos.d/
directory for RedHat based distributions, or in the /etc/zypp/repos.d/
directory for OpenSuSE based distributions, containing:
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl
gpgcheck=1
gpgkey
enabled=1
autorefresh=1
type=rpm-md
三、根据命令安装
You can now install Elasticsearch with one of the following commands:
sudo yum install elasticsearch
sudo dnf install elasticsearch
sudo zypper install elasticsearch