ELK

Logstash部署及插件安装

2021-11-22  本文已影响0人  留雨痕

1. 下载logstash

[root@localhost ~]# wget https://artifacts.elastic.co/downloads/logstash/logstash-6.7.0.tar.gz

2. 解压并复制到指定目录下

[root@localhost ~]# tar xzf logstash-6.7.0.tar.gz

[root@localhost ~]# cp -rf logstash-6.7.0 /usr/local/logstash

3. 自定义配置之后启动服务

[root@localhost ~]# nohup bin/logstash -t -f /usr/local/logstash/conf/logstash.conf &

 4. 安装logstash-input-jdbc插件

[root@localhost ~]# yum install gem

[root@localhost ~]# gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/

[root@localhost ~]# gem sources -l

[root@localhost ~]# cd /usr/local/logstash

# 替换源

[root@localhost ~]# vi Gemfile

#修改Gemfile文件

#source https://rubygems.org/

source "https://gems.ruby-china.com/"

[root@localhost ~]# vi Gemfile.lock

#remote: https://rubygems.org/

remote: https://gems.ruby-china.com/

[root@localhost ~]# cd /usr/local/logstash/bin

[root@localhost bin]# ./logstash-plugin install --no-verify logstash-input-jdbc

上一篇 下一篇

猜你喜欢

热点阅读