Use the FreeBSD ports system to install requisite packages:
~$ sudo portinstall postgresql tomcat55 apache-ant
To be continued ...