ubuntu安装elasticsearch7
2021-11-22 本文已影响0人
twinkle8858
- 导入密钥
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,这意味着密钥已成功导入,并且来自此存储库的软件包将被视为受信任的。
- 将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'
- 更新储存库,执行安装命令
sudo apt update
sudo apt install elasticsearch
- 启动elasticsearch
sudo service elasticsearch start
- 测试是否启动成功
curl http://localhost:9200