STEP 3: Install Elasticsearch 2.3
Elasticsearch requires at least Java version 7. We have already installed Java in the first step. To check the current version installed, run java -version
.
1 2 3 4 |
[root@command ~]# java -version java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode) |
Once it is verified that the version installed is at least Java 7, we can now proceed in installing Elasticsearch.
Install the public signing key from elastic.co’s repository:
1 |
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch |
Just as we did with MongoDB, we need to add the Elasticsearch repository in our configuration. Create a new file vim /etc/yum.repos.d/
an copy the following inside it.
1 2 3 4 5 6 |
[elasticsearch-2.x] name=Elasticsearch repository for 2.x packages baseurl=https://packages.elastic.co/elasticsearch/2.x/centos gpgcheck=1 gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch enabled=1 |
Install Elasticsearch using yum.
1 2 |
yum -y install elasticsearch chkconfig elasticsearch on |
Open the Elasticsearch configuration file with and edit the cluster.name and network.host
vim /etc/elasticsearch/
1 2 |
cluster.name: graylog-development network.host: localhost |