首页 > 代码库 > elasticsearch rpm 安装

elasticsearch rpm 安装

参考:http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html

Download and install the Public Signing Key

  1. rpm --import https://packages.elasticsearch.org/GPG-KEY-elasticsearch

Add the following in your /etc/yum.repos.d/ directory in a file named (for example) elasticsearch.repo

  1. [elasticsearch-1.4]
  2. name=Elasticsearch repository for 1.4.x packages
  3. baseurl=http://packages.elasticsearch.org/elasticsearch/1.4/centos
  4. gpgcheck=1
  5. gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch
  6. enabled=1

And your repository is ready for use. You can install it with :

  1. yum install elasticsearch

Configure Elasticsearch to automatically start during bootup. If your distribution is using SysV, then you will need to run :

  1. chkconfig --add elasticsearch

Otherwise if your distribution is using systemd :

  1. sudo /bin/systemctl daemon-reload
  2. sudo /bin/systemctl enable elasticsearch.service

安装脚本:

  1. sudo rpm --import https://packages.elasticsearch.org/GPG-KEY-elasticsearch
  2. sudo cat >/etc/yum.repos.d/elasticsearch.repo <<EOF
  3. [elasticsearch-1.4]
  4. name=Elasticsearch repository for 1.4.x packages
  5. baseurl=http://packages.elasticsearch.org/elasticsearch/1.4/centos
  6. gpgcheck=1
  7. gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch
  8. enabled=1
  9. EOF
  10. yum install elasticsearch


来自为知笔记(Wiz)


elasticsearch rpm 安装