Steps to install Logstash on Ubuntu and Debian:

  1. Add ELK repository to apt.
    1. Add GPG key of ELK's repository via apt-key.
      $ wget --quiet --output-document=- | sudo apt-key add -
      [sudo] password for user:
    2. Add ELK's repository to apt's repository list.
      $ echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
      deb stable main
  2. Update list of available packages from the newly added repository.
    $ sudo apt update
  3. Install latest Java Runtime Environment.
    $ sudo apt install --assume-yes openjdk-11-jre
  4. Install logstash package.
    $ sudo apt install --assume-yes logstash
  5. Configure logstash options located in /etc/logstash/logstash.yml.
    1. Allow connection from remote host.

  6. Configure logstash to automatically start during boot.
    $ sudo systemctl enable logstash
  7. Start logstash service.
     $ sudo systemctl start logstash
Discuss the article:

Comment anonymously. Login not required.