标签:city 应用 virt parser ofo dha pre last end
主机安装td-agentcurl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh
yum remove 应用名
docker安装fluentd的官方文档
https://hub.docker.com/r/fluent/fluentd
执行这条命令拉取docker images,并运行
docker run -d -p 24224:24224 -p 24224:24224/udp -v /data:/fluentd/log fluent/fluentd
docker exec -it cd499192c2a3 /bin/sh
这里主要是升级一下ruby库和安装基础的依赖包
buildDeps="sudo make gcc g++ libc-dev ruby-dev" && apt-get update && apt-get install -y --no-install-recommends $buildDeps && sudo gem install fluent-plugin-elasticsearch 对安装的软件包做一下清除,可以减小images的大小
sudo gem sources --clear-all && SUDO_FORCE_REMOVE=yes apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps && rm -rf /var/lib/apt/lists/* /home/fluent/.gem/ruby/2.3.0/cache/*.gem
apt-get update
apt-get install rubygems build-essential
我们需要ES、S3、geoip、rewrite-tag-filter
gem install fluent-plugin-elasticsearch
gem install fluent-plugin-s3
gem install fluent-plugin-rewrite-tag-filter
gem install fluent-plugin-multi-format-parser
fluent-gem install fluent-plugin-multi-format-parser
fluentd安装geoip时,必须安装“libmaxminddb”,先把依赖包安装好后,geoip就能装上了。
apk add --update --virtual .build-deps sudo build-base ruby-dev
apk add --no-cache geoip geoip-dev libmaxminddb
apk add automake autoconf libtool
/usr/bin/gem install fluent-plugin-geoip
gem install geoip2_c
geoip数据库的安装
cd /home/ec2-user/Fluentd/plugin
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
标签:city 应用 virt parser ofo dha pre last end
原文地址:http://blog.51cto.com/11078047/2316881