fluentd安装使用
1.git的安装
如果是源码安装fluent的话才需要git.
wget https://git-core.googlecode.com/files/git-1.8.1.tar.gz
./configure --prefix=/home/admin/fluent/deplib/
make –j 12 &&make install
2.ruby的安装
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
./configure --prefix=/home/admin/fluent/deplib/
make –j 12 &&make install
添加PATH环境变量
3.rubygems的安装
wget http://rubyforge.org/frs/download.php/76073/rubygems-1.8.24.tgz
export GEM_HOME=/home/admin/fluent/deplib/gems ;ruby ./setup.rb --prefix=/home/admin/fluent/deplib/
将export GEM_HOME=/home/admin/fluent/deplib/gems添加到.bash_profile文件中
4.fluentd的安装
4.1 gem方式的安装
http://docs.fluentd.org/articles/install-by-gem
gem install fluentd
注意查看/home/admin/fluent/deplib/gems/gems目录下的变化
gem search -rd fluent-plugin 可以查看有那些插件
gem install fluent-plugin-redis 安装插件即可
4.2源码安装
http://docs.fluentd.org/articles/install-from-source
git clone git://github.com/fluent/fluentd.git 如果是https开头的话,可能会出错
gem install jeweler (执行rake build 会报错,提醒你执行)
rake build
gem install pkg/fluentd-0.10.30.gem