当前位置:Gxlcms > linux教程 > 在RedHat上安装Fluentd的步骤

在RedHat上安装Fluentd的步骤

时间:2021-07-01 10:21:17 帮助过:14人阅读

  Fluentd作为一个日志收集系统,其用户还是非常大的,可是安装Fluentd的步骤非常繁琐,许多人在安装的时候就遇到了难题,下面小编就给大家介绍下RedHat安装Fluentd的方法。

 在RedHat上安装Fluentd的步骤

  下载fluentd安装包并解压

  tar zxvf fluentd-0.10.6.tar.gz

  cd fluentd-0.10.6

  。/configure

  make

  切换到root账号

  make install

  提示如下

  rake aborted!

  Unable to determine name from existing gemspec. Use :name =》 ‘gemname’ in #install_tasks to manually set it.

  /usr/local/lib/fluent/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:30:in `initialize‘

  /usr/local/lib/fluent/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:14:in `new’

  /usr/local/lib/fluent/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:14:in `install_tasks‘

  /home/aircom/fluentd-0.10.6/Rakefile:6:in `《top (required)》’

  /usr/local/lib/fluent/ruby/lib/ruby/1.9.1/rake.rb:2373:in `load‘

  /usr/local/lib/fluent/ruby/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile’

  /usr/local/lib/fluent/ruby/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile‘

  /usr/local/lib/fluent/ruby/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling’

  /usr/local/lib/fluent/ruby/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile‘

  /usr/local/lib/fluent/ruby/lib/ruby/1.9.1/rake.rb:1991:in `run’

  -e:1:in `《main》‘

  make: *** [install] Error 1

  安装ruby

  rz ruby-1.9.3-p0.tar.gz

  tar zxvf ruby-1.9.3-p0.tar.gz

  cd ruby-1.9.3-p0

  。/configure

  make

  make install

  验证ruby

  [root@Server201 ruby-1.9.3-p0]# ruby -v

  得到提示信息

  ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

  执行安装

  gem install fluentd

  提示如下,不必理会,等待安装,稍等一会儿(视网络情况)可看到安装进度。

  /usr/local/lib/ruby/1.9.1/yaml.rb:56:in `《top (required)》’:

  It seems your ruby installation is missing psych (for YAML output)。

  To eliminate this warning, please install libyaml and reinstall your ruby.

  命令执行完之后

  执行fluentd --setup

  提示Installed /etc/fluent/fluent.conf.

  执行fluentd -c fluent.conf -vv &

人气教程排行