Logstash 安装

  • 时间:
  • 浏览:2
  • 来源:大发5分快3_极速5分PK10

}

input {

[root@jiaxin-ceshi logstash-6.4.2]# bin/logstash -f logs.conf

[root@jiaxin-ceshi src]# tar xf jdk-8u191-linux-x64.tar.gz

[root@jiaxin-ceshi src]# mv jdk1.8.0_191/ jdk

[root@jiaxin-ceshi src]# pwd

/usr/local/src

[root@jiaxin-ceshi src]# vim /etc/profile

[root@jiaxin-ceshi src]# source /etc/profile

[root@jiaxin-ceshi logstash-6.4.2]# vim logs.conf

如此找到java 请下载安装JDK



JDK1.8官网下载

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[root@jiaxin-ceshi src]# wget http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1540276120_a53a7ca68550d86acefed40e892da884

}

[root@jiaxin-ceshi src]# java -version

java version "1.8.0_191"

Java(TM) SE Runtime Environment (build 1.8.0_191-b12)

Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

二、[root@jiaxin-ceshi logstash-6.4.2]# bin/logstash -e 'input { stdin { } } output { stdout {} }'

JAVA_HOME=/usr/local/src/jdk

JRE_HOME=/usr/local/src/jdk/jre

PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib

export JAVA_HOME JRE_HOME PATH CLASSPATH

output {

https://www.elastic.co/cn/downloads/logstash官网

一、下载logstash

[root@jiaxin-ceshi ~]# cd /usr/local/src/

[root@jiaxin-ceshi src]# wget https://artifacts.elastic.co/downloads/logstash/logstash-6.4.2.tar.gz

[root@jiaxin-ceshi src]# tar xf logstash-6.4.2.tar.gz

[root@jiaxin-ceshi src]# cd logstash-6.4.2

[root@jiaxin-ceshi logstash-6.4.2]# bin/logstash -f logstash.conf

could not find java; set JAVA_HOME or ensure java is in PATH