LoginSignup
0
0

More than 5 years have passed since last update.

Elasticsearch5.5 X-Pack5.5をインストールしてみた

Last updated at Posted at 2017-07-12

概要
centos7にElasticsearch 5.5とX-pack5.5をインストールしてみました。

環境
centos 7

■まずはElastcisearchをインストール

yum install -y java java-1.8.0-openjdk-devel
yum -y update

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.rpm
sha1sum elasticsearch-5.5.0.rpm
rpm --install elasticsearch-5.5.0.rpm

wget https://artifacts.elastic.co/downloads/kibana/kibana-5.5.0-x86_64.rpm
sha1sum kibana-5.5.0-x86_64.rpm
rpm --install kibana-5.5.0-x86_64.rpm

wget https://artifacts.elastic.co/downloads/logstash/logstash-5.5.0.rpm
sha1sum logstash-5.5.0.rpm 
rpm --install logstash-5.5.0.rpm 

■次はymlを修正

vi /etc/kibana/kibana.yml
server.host:”0.0.0.0”
#外部からのアクセスを受け付けるとき

同じくelasticsearch.ymlも修正する。

vi /etc/elasticsearch/elasticsearch.yml
network.host:"0.0.0.0"
#外部からのアクセスを受け付ける

■Firewallに追記

firewall-cmd --permanent --add-port=9200/tcp
firewall-cmd --permanent --add-port=5601/tcp
firewall-cmd --reload

■続いてpublic.xmlで反映を確認

vi /etc/firewalld/zones/public.xml

 <port protocol="tcp" port="5601"/>
 <port protocol="tcp" port="9200"/>

■Elasticsearchが起動するか確認

systemctl start elasticsearch
systemctl start kibana
systemctl start logstash
systemctl enable elasticsearch
systemctl enable kibana
systemctl enable logstsh

■起動を確認

curl http://localhost:9200
curl http://localhost:5601

■x-pack5.5はダウンロード個別にダウンロードしてSCPを使ってuploadいた方が早い。例は/tmpに一時保管してインストールしました。

/usr/share/elasticsearch/bin/elasticsearch-plugin install file:///tmp/x-pack5.5.0.zip
/usr/share/kibana/bin/kibana-plugin install file:///tmp/x-pack5.5.0.zip
/usr/share/logstash/bin/logstash-plugin install file:///tmp/x-pack5.5.0.zip

■サービス再起動

systemctl restart elasticsearch
systemctl restart kibana
systemctl restart logstash

■起動確認 x-packをインストールするとパスワードが必要になりました。

curl -u elastic:changeme localhost:9200
curl -u elastic:changeme localhost:5601

これで一通り完了、作業時間は3〜4時間くらいです。

0
0
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
0
0