1. Install Node.js & NPM
If you already have node.js and npm installed on your system skip this step. Else you need to install node.js on your system first. Use following set of commands to install node.js and npm on your system.
# yum install -y gcc-c++ make # curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash - # yum install nodejs
2. Install Grunt using NPM
Now use following command to install grunt and grunt cli using npm command line utility.
# npm install -g grunt
After successful installation make sure grunt has been installed successful and check version.
$ grunt --version grunt-cli v1.2.0