PS C:\Users\shirokuma> ssh elk@192.168.0.2
[elk@localhost ~]$ su -
[root@localhost ~]# rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
[root@localhost ~]# vi /etc/yum.repos.d/elasticsearch.repo
[elasticsearch]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md
[root@localhost ~]# yum install --enablerepo=elasticsearch elasticsearch
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl enable elasticsearch.service
[root@localhost ~]# systemctl start elasticsearch.service
[root@localhost ~]# systemctl stop elasticsearch.service
[root@localhost ~]# journalctl --unit elasticsearch
[root@localhost ~]# firewall-cmd --add-service=elasticsearch --zone=public --permanent
[root@localhost ~]# firewall-cmd --reload
[root@localhost ~]# systemctl start elasticsearch.service
[root@localhost ~]# curl 127.0.0.1:9200