llenv を使って fluentd をインストールしてみた(修正と追記)

bundler を使って入れ直す

[twitter:@riywo] さんから


という指摘をもらったので、bundler を使ってインストールしてみた。

$ cd ~/llenv/apps/fluentd/
$ llenv exec gem -- install bundle
$ cat > Gemfile <<EOF
heredoc> source :rubygems
heredoc>
heredoc> gem 'fluentd'
EOF
$ llenv exec bundle -- install --path vendor/bundle

これで、fluentd を動かすための環境全てを ~/llenv/apps/fluentd/ 以下に閉じ込めることができた。

いちぉ、前回インストールしてしまった分は削除しておく

$ llenv exec gem -- uninstall cool.io http_parser.rb json yajl-ruby iobuffer msgpack fluentd

fluentd を実行する場合は、 bundler を使って、

$ llenv exec bundle -- exec fluentd -c fluent.conf -vv

でも良いのだけど、どうやら

$ llenv exec fluentd -- -c fluent.conf -vv

でも動くみたい。

lsb-release について

CentOS には lsb_release が無いというのは誤りで、
redhat-lsb パッケージに含まれていました。(これも @riywo さんの指摘で知りました)

ただこれ、標準だと入ってないみたいですし、結局 /etc/redhat-release の値を使ってごにょごにょしてるだけだったり……。