Skip to content

Instantly share code, notes, and snippets.

@rilutham
Last active April 1, 2020 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rilutham/b5bc39cf200e4ea82a6a0815f494567e to your computer and use it in GitHub Desktop.
Save rilutham/b5bc39cf200e4ea82a6a0815f494567e to your computer and use it in GitHub Desktop.
Fluentd Installation Script For Amazon Linux 2018.03
echo "=============================="
echo " td-agent Installation Script "
echo "=============================="
echo "This script requires superuser access to install rpm packages."
echo "You will be prompted for your password by sudo."
# clear any previous sudo permission
sudo -k
# run inside sudo
sudo sh <<SCRIPT
# add GPG key
rpm --import https://packages.treasuredata.com/GPG-KEY-td-agent
# add treasure data repository to yum
cat >/etc/yum.repos.d/td.repo <<'EOF';
[treasuredata]
name=TreasureData
baseurl=http://packages.treasuredata.com/3/amazon/1/\$releasever/\$basearch
gpgcheck=1
gpgkey=https://packages.treasuredata.com/GPG-KEY-td-agent
EOF
# update your sources
yum check-update
# install the toolbelt
yes | yum install -y td-agent
SCRIPT
# message
echo ""
echo "Installation completed. Happy Logging!"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment