Skip to content

Instantly share code, notes, and snippets.

@kkosuge
Created February 12, 2015 09:26
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 kkosuge/92e4c1faf210a433c1cf to your computer and use it in GitHub Desktop.
Save kkosuge/92e4c1faf210a433c1cf to your computer and use it in GitHub Desktop.
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 http://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/2/redhat/7/\$basearch
gpgcheck=1
gpgkey=http://packages.treasuredata.com/GPG-KEY-td-agent
EOF
# update your sources
yum check-update
# install the toolbelt
yes | yum install -y td-agent
SCRIPT
@kkosuge
Copy link
Author

kkosuge commented Feb 12, 2015

curl -L https://gist.githubusercontent.com/kkosuge/92e4c1faf210a433c1cf/raw/e966ae0ce4b8834fea68baddc7408e6ac5f88a97/install-redhat-td-agent2-amazon-linux.sh | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment