centos安装elasticsearch

2022/1/6 7:09:48

本文主要是介绍centos安装elasticsearch,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

  • 安装JDK yum install -y java-1.8.0-openjdk
  • 下载安装公钥 rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
  • 配置yum源 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


这篇关于centos安装elasticsearch的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程