http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.0/bk_installing_manually_book/bk_installing_ma...
Take a look at page 58. Terasort is already part of hadoop-mapreduce-examples-<version>.jar. This has steps on how to execute terasort after install is complete.