Last active
April 1, 2020 02:38
-
-
Save rilutham/b5bc39cf200e4ea82a6a0815f494567e to your computer and use it in GitHub Desktop.
Fluentd Installation Script For Amazon Linux 2018.03
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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