Redhat linux下安裝fluentd

來源:互聯網
上載者:User


Redhat linux下安裝fluentd 下載fluentd安裝包並解壓tar zxvf fluentd-0.10.6.tar.gz cd fluentd-0.10.6   ./configure make  www.2cto.com  切換到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'  www.2cto.com  /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 安裝rubyrz ruby-1.9.3-p0.tar.gztar zxvf ruby-1.9.3-p0.tar.gz cd ruby-1.9.3-p0 ./configuremake 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 &輸出  www.2cto.com   2012-09-27 17:45:16 +0800: fluent/supervisor.rb:153:supervise: starting fluentd-0.10.262012-09-27 17:45:16 +0800: fluent/supervisor.rb:235:read_config: reading config file path="fluent.conf"2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered buffer plugin 'file'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered buffer plugin 'memory'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'debug_agent' 2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'exec'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'forward'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'gc_stat'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'http'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'object_space'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'status'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'tcp'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'unix'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'syslog'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered input plugin 'tail'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'copy'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'exec' 2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'exec_filter'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'file'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'forward'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'null'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'roundrobin'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'stdout'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'tcp'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'unix'2012-09-27 17:45:16 +0800: fluent/plugin.rb:89:register_impl: registered output plugin 'test'2012-09-27 17:45:16 +0800: fluent/engine.rb:65:block in configure: adding source type="forward"2012-09-27 17:45:16 +0800: fluent/engine.rb:65:block in configure: adding source type="http"  www.2cto.com  2012-09-27 17:45:16 +0800: fluent/engine.rb:81:block in configure: adding match pattern="debug.**" type="stdout"2012-09-27 17:45:16 +0800: plugin/in_forward.rb:61:listen: listening fluent socket on 0.0.0.0:242242012-09-27 17:45:16 +0800: plugin/in_http.rb:74:start: listening http on 0.0.0.0:8888驗證監聽連接埠netstat -na | grep 88tcp        0      0 0.0.0.0:8888                0.0.0.0:*                   LISTEN      tcp        0      0 127.0.0.1:48241             127.0.0.1:8888              TIME_WAIT   udp        0      0 :::58872                    :::*                                      www.2cto.com  unix  2      [ ]         DGRAM                    9880   unix  2      [ ]         DGRAM                    8859   unix  2      [ ]         DGRAM                    8846   unix  2      [ ]         DGRAM                    8806    發送資料驗證echo '{"json":"message"}'|fluent-cat debug.test 得到輸出2012-09-27 17:45:32 +0800: plugin/in_forward.rb:140:initialize: accepted fluent socket object_id=953240802012-09-27 17:45:32 +0800 debug.test: {"json":"message"}2012-09-27 17:45:32 +0800: plugin/in_forward.rb:181:on_close: closed fluent socket object_id=95324080
 至此安裝全部完成。總結:其實直接進行的是線上安裝,提前下載fluent包沒用。可直接從安裝ruby開始,待驗證。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.