CentOS默认下通过yum是无法安装 es的,需要配置一个单独的 repo路径。
在/etc/yum.repos.d/ 的目录下增加一个 elasticsearch.repo 的文件,将以下内容写入文件中
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
执行 yum search elastic就可以看到 es了
elasticsearch.x86_64 : Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html and the 'Elasticsearch:
: The Definitive Guide' book can be found at https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
heartbeat-elastic.i686 : Ping remote services for availability and log results to Elasticsearch or send to Logstash.
heartbeat-elastic.x86_64 : Ping remote services for availability and log results to Elasticsearch or send to Logstash.
执行 yum install elasticsearch.x86_64 安装就可以了!