So-net無料ブログ作成
  • ブログをはじめる
  • ログイン

Elasticsearchの仕切り直し導入 その1 (CentOS 7.5、2018/08/12) [Linux]

いろいろElasticsearchで試していたのですが、どうにもこうにもエラーが多く、そのエラーの原因が設定によるものなのか、FreeBSDという特殊な環境で実行しようとしているからなのか判断が難しく、だったらちゃんと動くであろうLinux環境で正規の環境を作ってみることにしました。

選んだディストリビューションはCentOSで、最初はどこにインストールしようかと迷い、VirtualBoxの導入も考えたのですが、Windows10 ProfessionalだとHyper-Vが使えるのですね。標準状態では導入されていないので「アプリケーションの追加と削除」で追加すれば、すぐに使えるようになりました。
なお、私のLinux知識は貧弱なので、まどろっこしいことをやっていても多少は大目に見て貰えるとありがたいです。(昔触ったのが、雑誌の付録のRedHatや、LASER5 Linuxとかそういった時代です)

インストールはサクッと終わらせて、yum updateで一通りアップデートします。このあたりはFreeBSDのpkgと通ずるものがありますね。
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)

elasticsearchの導入は正に下記の通りなので、順番にやっていきます。
https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html#rpm-repo
[root@localhost ~]# rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
[root@localhost ~]#
[root@localhost ~]# cat /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
[root@localhost ~]# yum search elastic
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
=============================================================================== N/S matched: elastic ===============================================================================
elasticsearch.noarch : Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at
                     : https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html and the 'Elasticsearch: The Definitive Guide' book can be found at
                     : https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
heartbeat-elastic.i686 : Ping remote services for availability and log results to Elasticsearch or send to Logstash.
heartbeat-elastic.x86_64 : Ping remote services for availability and log results to Elasticsearch or send to Logstash.
pcp-pmda-elasticsearch.x86_64 : Performance Co-Pilot (PCP) metrics for Elasticsearch
rsyslog-elasticsearch.x86_64 : ElasticSearch output module for rsyslog
apm-server.i686 : Sends events to Elasticsearch or Logstash
apm-server.x86_64 : Elastic Application Performance Monitoring Server
filebeat.i686 : Filebeat sends log files to Logstash or directly to Elasticsearch.
filebeat.x86_64 : Filebeat sends log files to Logstash or directly to Elasticsearch.
kibana.x86_64 : Explore and visualize your Elasticsearch data
kibana-oss.x86_64 : Explore and visualize your Elasticsearch data
metricbeat.i686 : Metricbeat sends metrics to Elasticsearch.
metricbeat.x86_64 : Metricbeat sends metrics to Elasticsearch.
packetbeat.i686 : Packetbeat analyzes network traffic and sends the data to Elasticsearch.
packetbeat.x86_64 : Packetbeat analyzes network traffic and sends the data to Elasticsearch.

  Name and summary matches only, use "search all" for everything.

[root@localhost ~]# yum search logstash
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
============================================================================== N/S matched: logstash ===============================================================================
apm-server.i686 : Sends events to Elasticsearch or Logstash
apm-server.x86_64 : Sends events to Elasticsearch or Logstash
filebeat.i686 : Filebeat sends log files to Logstash or directly to Elasticsearch.
filebeat.x86_64 : Filebeat sends log files to Logstash or directly to Elasticsearch.
heartbeat-elastic.i686 : Ping remote services for availability and log results to Elasticsearch or send to Logstash.
heartbeat-elastic.x86_64 : Ping remote services for availability and log results to Elasticsearch or send to Logstash.
logstash.noarch : An extensible logging pipeline
[root@localhost ~]# yum install java-1.8.0-openjdk.x86_64 elasticsearch.noarch kibana.x86_64 logstash.noarch metricbeat.x86_64
[root@localhost ~]# systemctl enable elasticsearch
[root@localhost ~]# systemctl start elasticsearch
[root@localhost ~]# systemctl enable kibana
[root@localhost ~]# systemctl start kibana
[root@localhost ~]# curl localhost:9200
{
  "name" : "kdFfHZ4",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "Bcxt78mURJm572vA99EN-A",
  "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"
}

と、最初はこんな感じで。
nice!(0)  コメント(0) 
共通テーマ:日記・雑感

nice! 0

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。