1. Add Elasticsearch repository to yum.

    Logstash package resides in the same repository as Elasticsearch

    1. Download and install the public signing key.

      # rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
    2. Add the following lines to /etc/yum.repos.d/elasticsearch.repo.

      [elasticsearch-6.x]
      name=Elasticsearch repository for 6.x packages
      baseurl=https://artifacts.elastic.co/packages/6.x/yum
      gpgcheck=1
      gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
      enabled=1
      autorefresh=1
      type=rpm-md
  2. Install Logstash package via yum.

    # yum install -y logstash