| 95 | ## Td-agent installation |
| 96 | |
| 97 | {{{ |
| 98 | echo "==============================" |
| 99 | echo " td-agent Installation Script " |
| 100 | echo "==============================" |
| 101 | echo "This script requires superuser access to install rpm packages." |
| 102 | echo "You will be prompted for your password by sudo." |
| 103 | |
| 104 | # clear any previous sudo permission |
| 105 | sudo -k |
| 106 | |
| 107 | # run inside sudo |
| 108 | sudo sh <<SCRIPT |
| 109 | |
| 110 | # add GPG key |
| 111 | rpm --import https://packages.treasuredata.com/GPG-KEY-td-agent |
| 112 | |
| 113 | # add treasure data repository to yum |
| 114 | cat >/etc/yum.repos.d/td.repo <<'EOF'; |
| 115 | [treasuredata] |
| 116 | name=TreasureData |
| 117 | baseurl=http://packages.treasuredata.com/2/redhat/\$releasever/\$basearch |
| 118 | gpgcheck=1 |
| 119 | gpgkey=https://packages.treasuredata.com/GPG-KEY-td-agent |
| 120 | EOF |
| 121 | |
| 122 | # update your sources |
| 123 | yum check-update |
| 124 | |
| 125 | # install the toolbelt |
| 126 | yes | yum install -y td-agent |
| 127 | |
| 128 | SCRIPT |
| 129 | |
| 130 | # message |
| 131 | echo "" |
| 132 | echo "Intallation completed. Happy Logging!" |
| 133 | echo "" |
| 134 | echo "NOTE: In case you need any of these:" |
| 135 | echo " 1) security tested binary with a clear life cycle management" |
| 136 | echo " 2) advanced monitoring and management" |
| 137 | echo " 3) support SLA" |
| 138 | echo "Please check Fluentd Enterprise (https://fluentd.treasuredata.com/)." |
| 139 | }}} |