There are instructions for both already in the wiki: https://github.com/johnsyweb/openmrs-cpm/wiki/HowTo