一、导入Elasticsearch PGP Key
We sign all of our packages with the Elasticsearch Signing Key (PGP key D88E42B4, available from https://pgp.mit.edu) with fingerprint:
4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4
Download and install the public signing key:
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
二、部署仓库 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=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
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
其他版本请参看以下链接
https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html