Help us understand the problem. What is going on with this article?

CentOS7へのElasticsearch6.3 のインストール

More than 1 year has passed since last update.

CentOS7環境へのElasticsearchのインストールについて纏めます。環境は次の通りです。

・CentOS 7.5
・Elasticsearch 6.3

タイムゾーンをJST に変更

# timedatectl set-timezone Asia/Tokyo

JDK のインストール

# yum -y install java-1.8.0-openjdk-devel.x86_64

こちらを参考に、PGP keyのインポートとElasticsearch の yum リポジトリの登録

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

# vi /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Elasticsearchのインストール

# yum install -y elasticsearch

サービスの起動

# systemctl enable elasticsearch.service
# systemctl start elasticsearch.service

起動の確認

# curl localhost:9200
# curl localhost:9200
{
  "name" : "9QZvJ8A",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "fYubptPbRTOzsRpMrg2rjw",
  "version" : {
    "number" : "6.3.2",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "053779d",
    "build_date" : "2018-07-20T05:20:23.451332Z",
    "build_snapshot" : false,
    "lucene_version" : "7.3.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

可視化用 Kibanaのインストール

# yum install -y kibana

kibana.yml の設定変更

# vi /etc/kibana/kibana.yml
server.host: X.X.X.X    (サーバのローカル IP アドレスを指定)

Kibanaの起動とFirewallの設定

# systemctl enable kibana.service
# systemctl start kibana.service

# firewall-cmd --add-port=5601/tcp --zone=public --permanent
# firewall-cmd --add-service=http --zone=public --permanent
# systemctl restart firewalld

Kibanaへのアクセス

http://サーバのIPアドレス:5601/

Kibana.JPG

m-eno
VMware、k8s、ServiceNow、RDB/NoSQL
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away