First, you need to download it to your environment. At the time of writing, TomEE has no Java EE 8 compatible version (actually, there is only GlassFish 5). However, the tasks covered here shouldn't change in future versions as they are not attached to the Java EE specs.
To download it, just visit http://tomee.apache.org/downloads.html. This recipe in based on version 7.0.2 Plume.
Wherever possible, we will focus on doing tasks using the configuration files.