参考: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 packages
baseurl=http://packages.elasticsearch.org/elasticsearch/1.4/centos
gpgcheck=1
gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch
enabled=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-reload
sudo /bin/systemctl enable elasticsearch.service
安装脚本:
sudo rpm --import https://packages.elasticsearch.org/GPG-KEY-elasticsearch
sudo cat >/etc/yum.repos.d/elasticsearch.repo <<EOF
[elasticsearch-1.4]
name=Elasticsearch repository for 1.4.x packages
baseurl=http://packages.elasticsearch.org/elasticsearch/1.4/centos
gpgcheck=1
gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch
enabled=1
EOF
yum install elasticsearch
时间: 2024-10-21 14:58:05