From 41d55a44fb1b67b8a245944c23356d60c7f39a0d Mon Sep 17 00:00:00 2001 From: zeus Date: Sun, 21 Nov 2021 20:23:53 +0200 Subject: [PATCH] add fluentd --- WriteToMongo/fluent/install-fluent-root.sh | 13 ------------- WriteToMongo/fluent/install-fluent.sh | 15 ++++++++------- 2 files changed, 8 insertions(+), 20 deletions(-) delete mode 100755 WriteToMongo/fluent/install-fluent-root.sh diff --git a/WriteToMongo/fluent/install-fluent-root.sh b/WriteToMongo/fluent/install-fluent-root.sh deleted file mode 100755 index babc1bb..0000000 --- a/WriteToMongo/fluent/install-fluent-root.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -BASEDIR=$(dirname $0) -cpwd=$PWD - -echo $BASEDIR - -cd $BASEDIR - - -cp fluent.conf /fluentd/etc/ -/tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem - diff --git a/WriteToMongo/fluent/install-fluent.sh b/WriteToMongo/fluent/install-fluent.sh index e890f8c..44217a9 100755 --- a/WriteToMongo/fluent/install-fluent.sh +++ b/WriteToMongo/fluent/install-fluent.sh @@ -7,11 +7,12 @@ echo $BASEDIR cd $BASEDIR -gem install fluentd --no-doc -gem install fluent-plugin-mongo -gem install oj -gem install json -gem install async-http -gem install ext-monitor -gem sources --clear-all +sudo -u node gem install fluentd --no-doc +sudo -u node gem install gem install fluent-plugin-mongo +sudo -u node gem install gem install oj +sudo -u node gem install gem install json +sudo -u node gem install gem install async-http +sudo -u node gem install gem install ext_monitor +sudo -u node gem install gem sources --clear-all +cp fluent.conf /fluentd/etc/