Since I like to work locally, I use "--save-dev" option. if you want to install it globally, replace "--save-dev" with "-g"
Here the steps.
1. npm install grunt-cli bower yo generator-karma generator-angular --save-dev
2. yo angular
3. npm install grunt-karma karma karma-phantomjs-launcher karma-jasmine karma-core jasmine-core phantomjs-prebuilt --save-dev
Now you should be able to run grunt:
> grunt
> grunt serve
It is now published on http://localhost:9000
Enjoy!