Debian安装Elasticsearch
Debian安装包可以从我们官方或者APT仓库下载, 这个可以在任何Debian系的系统上安装, 比如Debian和Ubuntu.
导入Elasticsearch PGP KEY
我们队所有Elasticsearch安装包用一下指纹签名(PGP KEY D88E42B4). 可以从https://pgp.mit.edu获得.
4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4
下载并安装公共签名密钥
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
从APT仓库安装
你可能需要先安装apt-transport-https
sudo apt-get install apt-transport-https
把仓库定义保存到/etc/apt/sources.list.d/elastic-6.x.list:
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
由于以下原因, 这些指令不使用add-apt-repository
- add-apt-repository adds entries to the system /etc/apt/sources.list file rather than a clean per-repository file in /etc/apt/sources.list.d
- add-apt-repository is not part of the default install on many distributions and requires a number of non-default dependencies.
- Older versions of add-apt-repository always add a deb-src entry which will cause errors because we do not provide a source package. If you have added the deb-src entry, you will see an error like the following until you delete the deb-src line:
你可以通过以下命令安装Elasticsearch
sudo apt-get update && sudo apt-get install elasticsearch