🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 下载解压 ``` curl -L -O https://artifacts.elastic.co/downloads/logstash/logstash-7.6.2.tar.gz tar -xzvf logstash-7.6.2.tar.gz ``` ## 移动 并重命名 mv logstash-7.6.2 /usr/local/logstash7 cd /usr/local/logstash7 ## 配置 cd config vim logstash-logback.conf 127.0.0.1:9200 要改成正确的 elasticsearch地址, ``` input { tcp { host => "0.0.0.0" port => 4560 mode => "server" tags => ["tags"] codec => json_lines } } output { stdout { codec => rubydebug } elasticsearch { hosts => "127.0.0.1:9200" } } ``` ## 启动 cd /usr/local/logstash7 nohup ./bin/logstash -f config/logstash-logback.conf 2>&1 &