LMS知識社群各系上網率圖資處首頁登入
02. Elasticsearch 6.X
by 洪瑞展 2019-05-22 08:36:45, 回應(0), 人氣(436)
#設定elasticsearch.repo
vim /etc/yum.repos.d/elasticsearch.repo

#新增下列內容
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/oss-6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

#安裝elasticsearch
yum install elasticsearch -y

#設定elasticsearch
vim /etc/elasticsearch/elasticsearch.yml

#修改以下內容
cluster.name: graylog
action.auto_create_index: false

#啟用與設定開起啟動elasticsearch
chkconfig --add elasticsearch
systemctl daemon-reload
systemctl enable elasticsearch.service
systemctl restart elasticsearch.service

#開啟防火牆
firewall-cmd --add-port={9200/tcp,9300/tcp} --permanent 
firewall-cmd --reload