- Install Xcode [download]
- Install Command Line Developer Tools
Xcode: [Preferences] -> [Downloads] -> [Command Line Tools]
- Install MacPorts [installation guide]
- Install RVM (Ruby Version Manager) [installation guide]
$ \curl -L https://get.rvm.io | bash -s stable --ruby
- Apply RVM's configuration
$ . ~/.bash_profile $ which rvm /Users/takahiko/.rvm/bin/rvm
- Install Ruby 2.0 [ruby homepage]
# 2.0.0-p247 is the latest version on Oct 11, 2013. $ sudo rvm install ruby-2.0.0-p247 $ which ruby /Users/takahiko/.rvm/rubies/ruby-2.0.0-p247/bin/ruby $ ruby --version ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
- Update gem
$ which gem /Users/takahiko/.rvm/rubies/ruby-2.0.0-p247/bin/gem $ gem update --system
- Install fluentd [fluentd homepage]
$ gem install fluentd $ which fluentd /Users/takahiko/.rvm/gems/ruby-2.0.0-p247/bin/fluentd
- Setup fluentd
$ fluentd --setup ./fluentd
- Run fluentd
$ fluentd -c ./fluentd/fluent.conf
- Send a log message to fluentd
$ curl http://localhost:8888/debug.http -F \ 'json={"greeting":"hello"}' # You'll see some output in fluentd's console.