Install Elasticsearch 5.0 on RHEL / CentOS

Install Elasticsearch 5.x On RHEL / CentOS using Elasticsearch Repository

Install Public Signing Key:

rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

Create new repo in your /etc/yum.repos.d/ directory. For example I have created elasticsearch.repo here.

/etc/yum.repos.d/elasticsearch.repo

[elasticsearch-5.x]
name=Elasticsearch repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Now your yum repository ready for use. You can install Elasticsearch 5.0 using below yum command.

yum install elasticsearch

Note: The repositories do not work with older rpm based distributions that still use RPM v3, like CentOS5.
Add Elasticsearch service to start automatically when the system boots up:

chkconfig --add elasticsearch

You can start stop Elasticsearch using service command

service elasticsearch start
service elasticsearch stop

Now we have done with Elasticsearch installation. You can check your default Elasticsearch configuration in /etc/elasticsearch/elasticsearch.yml

 

Reprinted from:  http://techieroop.com/install-elasticsearch-5-on-centos-rhel/

             https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326485618&siteId=291194637