Skip to content

Instantly share code, notes, and snippets.

@okkez
Last active February 28, 2018 01:01
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 okkez/831ab852528d52eabad0684c938db17b to your computer and use it in GitHub Desktop.
Save okkez/831ab852528d52eabad0684c938db17b to your computer and use it in GitHub Desktop.
Install td-agent3 on Debian
echo "=============================="
echo " td-agent Installation Script "
echo "=============================="
echo "This script requires superuser access to install apt packages."
echo "You will be prompted for your password by sudo."
# clear any previous sudo permission
sudo -k
# run inside sudo
sudo sh <<SCRIPT
curl https://packages.treasuredata.com/GPG-KEY-td-agent | apt-key add -
# add treasure data repository to apt
echo "deb http://packages.treasuredata.com/3/debian/$(lsb_release -sc)/ $(lsb_release -sc) contrib" > /etc/apt/sources.list.d/treasure-data.list
# update your sources
apt update
# install the toolbelt
apt install -y td-agent
SCRIPT
if [ $? = 0 ]; then
# message
echo ""
echo "Installation completed. Happy Logging!"
echo ""
else
# message
echo ""
echo "Installation incompleted. Check above messages."
echo ""
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment