This follows James Falkner's recipe.
Make sure you have Java and its compiler:
$ java -fullversion
java full version "1.7.0_55-b14"
$ javac -fullversion
javac full version "1.7.0_55-b14"
Make sure you have Ant:
$ ant -version
Apache Ant(TM) version 1.9.3 compiled on January 19 2014
Give Ant more room to work with:
$ export ANT_OPTS="-Xmx1G -XX:MaxPermSize=512m"
Download latest sources:
$ git clone https://github.com/liferay/liferay-portal portal
$ git clone https://github.com/liferay/liferay-plugins plugins
Those two repositories go together so make sure you have the latest master of both if you're pulling rather than cloning.
Create a directory for the bundle:
$ mkdir bundles
You should now see portal
, plugins
and bundles
:
$ ls -1
bundles
plugins
portal
Download Tomcat and extract it:
$ cd portal
$ ant -f build-dist.xml unzip-tomcat
Tomcat will be unzipped in ../tomcat-VERSION
(where VERSION
is the version,
e.g. 7.0.42
).
Build the portal core:
$ ant all
Build a few plugins that are usually bundled with Liferay:
$ cd ../plugins
$ ant -f portlets/marketplace-portlet/build.xml deploy
$ ant -f themes/welcome-theme/build.xml deploy
$ ant -f webs/resources-importer-web/build.xml deploy
Everything is put into ../bundles/deploy
.
Start Liferay as usual:
$ cd ../bundles/tomcat*
$ bin/catalina.sh run
Voilà!