Running Liferay 6.2 on Raspberry Pi 2

Liferay Pi2After developing Social Apps Proxy for the Java based Liferay platform just over a year ago, I have been looking for an inexpensive way to host a demo environment. I found the Raspberry Pi2 at £25 was ideal for this, so I will share my experience in configuring this. The general opinion of the web seems to be that the Pi2 and its 1GB RAM in particular is simply too under resourced to run Liferay, but these posts were often made before the release of Java 8 for ARM processors which makes a huge difference, especially when combined with ZRAM which I will cover later. I have Apache2, Liferay Portal 6.2 and MySQL 5.6 all running smoothly on a single Pi2 with about 200-300MB RAM free!

You are probably wondering what kind of performance to expect…

Liferay starts up in just under 10 minutes, and after a page has been requested at least once, it is served in about 1 second. That’s without any Apache / CDN type optimisation. Not bad I think!

I will explain all necessary steps to get Liferay running, but I will cover the Apache2 installation & configuration in a future post focussed on preparing a Liferay Pi2 stack for Internet facing applications.

All Linux commands are explained so no need to have prior Linux knowledge.

Continue reading