Download the fluentdinstallation package and decompress the tarzxvffluentd-0.10.6.tar.gz cdfluentd-0.10.6./configuremake switch to the root account makeinstall prompt rakeaborted! Unabletodeterminenamefromistinggemspec. Use: name = & gt; 'gemn
Download and decompress the fluentd installation package
Tar zxvf fluentd-0.10.6.tar.gz
Cd fluentd-0.10.6
./Configure
Make
Switch to the root account
Make install
The prompt is as follows:
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' '
/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' '
Make: *** [install] Error 1
Install 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
Verify ruby
[Root @ Server201 ruby-1.9.3-p0] # ruby-v
Get prompt information
Ruby 1.9.3p0 (revision 33570) [x86_64-linux]
Install
Gem install fluentd
The following message is displayed: Do not bother. Wait for the installation. Wait a moment (depending on the network conditions) and you will see the installation progress.
/Usr/local/lib/ruby/1.9.1/yaml. rb: 56: in' ':
It seems your ruby installation is missing psych (for YAML output ).
To eliminate this warning, please install libyaml and reinstall your ruby.
After the command is executed
Run fluentd -- setup
Prompt Installed/etc/fluent. conf.
Run fluentd-c fluent. conf-vv &
Output
17:45:16 + 0800: fluent/supervisor. rb: 153: supervise: starting fluentd-0.10.26
17:45:16 + 0800: fluent/supervisor. rb: 235: read_config: reading config file path = "fluent. conf"
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered buffer plugin 'file'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered buffer plugin 'memory'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'debug _ agent'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'exec'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'forward'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'gc _ stat'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'http'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'object _ space'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'status'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'tcp'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'unix'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'syslog'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered input plugin 'tail'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'copy'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'exec'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'exec _ filter'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'file'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'forward'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'null'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'roundrobin'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'stdout'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'tcp'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'unix'
17:45:16 + 0800: fluent/plugin. rb: 89: register_impl: registered output plugin 'test'
17:45:16 + 0800: fluent/engine. rb: 65: block in configure: adding source type = "forward"
17:45:16 + 0800: fluent/engine. rb: 65: block in configure: adding source type = "http"
17:45:16 + 0800: fluent/engine. rb: 81: block in configure: adding match pattern = "debug. **" type = "stdout"
17:45:16 + 0800: plugin/in_forward.rb: 61: listen: listening fluent socket on 0.0.0.0: 24224
17:45:16 + 0800: plugin/in_http.rb: 74: start: listening http on 0.0.0.0: 8888
Verify listening port
Netstat-na | grep 88
Tcp 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 :::*
Unix 2 [] DGRAM 9880
Unix 2 [] DGRAM 8859
Unix 2 [] DGRAM 8846
Unix 2 [] DGRAM 8806
Send data verification
Echo '{"json": "message"}' | fluent-cat debug. test
Get output
17:45:32 + 0800: plugin/in_forward.rb: 140: initialize: accepted fluent socket object_id = 95324080
17:45:32 + 0800 debug. test: {"json": "message "}
17:45:32 + 0800: plugin/in_forward.rb: 181: on_close: closed fluent socket object_id = 95324080
So far, the installation is complete.
Conclusion: in fact, the installation is online, and it is useless to download the fluent package in advance. You can directly start installing ruby and wait for verification.