参考:http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html
Download and install the Public Signing Key
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
[elasticsearch-1.4]name=Elasticsearch repository for 1.4.x packagesbaseurl=http://packages.elasticsearch.org/elasticsearch/1.4/centosgpgcheck=1gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearchenabled=1
And your repository is ready for use. You can install it with :
yum install elasticsearch
Configure Elasticsearch to automatically start during bootup. If your distribution is using SysV, then you will need to run :
chkconfig --add elasticsearch
Otherwise if your distribution is using systemd :
sudo /bin/systemctl daemon-reloadsudo /bin/systemctl enable elasticsearch.service
安装脚本:
sudo rpm --import https://packages.elasticsearch.org/GPG-KEY-elasticsearchsudo cat >/etc/yum.repos.d/elasticsearch.repo <<EOF[elasticsearch-1.4]name=Elasticsearch repository for 1.4.x packagesbaseurl=http://packages.elasticsearch.org/elasticsearch/1.4/centosgpgcheck=1gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearchenabled=1EOFyum install elasticsearch
原文:http://www.cnblogs.com/liyan101/p/4211861.html