10
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Posted at

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へのアクセス

Kibana.JPG

10
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?