yum install -y java-1.8.0-openjdk
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
vim /etc/yum.repos.d/elasticsearch.repo
,s
触发编辑,复制如下内容:[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
按键ESC
退出编辑,:wq
保存退出。
yum makecache
更新缓存yum install elasticsearch
vim /etc/elasticsearch/elasticsearch.yml
,设置network.host: 0.0.0.0
.sudo systemctl daemon-reload sudo systemctl enable elasticsearch.service sudo systemctl start elasticsearch.service