ubuntu安装elasticsearch7

2021-11-22  本文已影响0人  twinkle8858
  1. 导入密钥
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
或者
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

上面的命令应该输出OK,这意味着密钥已成功导入,并且来自此存储库的软件包将被视为受信任的。

  1. 将Elasticsearch存储库添加到系统中
sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'
  1. 更新储存库,执行安装命令
sudo apt update
sudo apt install elasticsearch
  1. 启动elasticsearch
sudo service elasticsearch start
  1. 测试是否启动成功
curl http://localhost:9200
上一篇下一篇

猜你喜欢

热点阅读