Installing Logstash on Centos 8
Logstash Is an open source data collection engine with real-time data pipelining capabilities. Logstash can dynamically identify data from various sources and normalize it using selected filters.
Installing Logstash from the repository
We import the PGP Key to further add the Elasticsearch repository
$ rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Add the Elasticsearch repository
$ sudo nano /etc/yum.repos.d/kibana.repo
[elasticsearch]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
Install OpenJDK 8 Java
$ sudo dnf -y install java-1.8.0-openjdk
Otherwise, an error will appear during the installation process: could not find java; set JAVA_HOME or ensure java is in PATHchmod: cannot access ‘/ etc / default / logstash’: No such file or directorywarning:% post (logstash-1: 7.9.3-1.noarch) scriptlet failed, exit status 1
Install Logstash
$ sudo dnf -y install logstash
Add the Logstash service to startup and start it
$ sudo systemctl enable --now logstash
Checking if the service has started
$ systemctl status logstash
Installing Logstash from an RPM package
Download the Logstash package and install it
$ wget https://artifacts.elastic.co/downloads/logstash/logstash-7.9.3.rpm -P /tmp
$ cd /tmp
$ sudo dnf -y localinstall logstash-7.9.3.rpm
Add the Logstash service to startup and start it
$ sudo systemctl enable --now logstash
Checking if the service has started
$ systemctl status logstash