网上有很多写Ubantua安装ELK日志服务的文档资料,但是很少有Debian安装的文档。因为前期对ELK接触很少,使用Debian安装总是在配置apt安装源的时候无法进行安装。经过扒翻资料,终于找到ELK官网给出的正解。如下:

1、安装java9

    apt install openjdk-9-jdk

2、配置镜像源:

安装公共密钥:
wget -qO  -  https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add  -

3、更新apt安装存储库:

 apt 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

   然后编辑/etc/apt/sources.list.d/elastic-6.x.list文件,去掉两边的双引号即可。


4、deb-src/etc/apt/sources.list文件中删除条目,使用apt update进行更新安装源。安装应按预期工作。

参考:https://www.elastic.co/guide/en/kibana/current/deb.html