Installing Liferay 6.2 Enterprise Edition on Websphere 8.0
Preparing Websphere for Liferay
When the application server binaries have been installed, start the Websphere application server (WAS) Profile Management Tool to create a profile appropriate for Liferay and follow the instructions as described here in the official Liferay documentation. The instructions are for installing Liferay 6.2 on Websphere 8.5, but I have installed it on Websphere 8.0 successfully following the same instructions.
Notes
- I did not want Websphere to manage the database connections, so I skipped the database step as long as I am using Liferay’s standard database configuration.
- I also skipped the mail configuration step because I did not care for that.
- Before completing the new profile wizard note down the port of where the administrative console runs (in my case it was 9062)
- I did not create the file portal-ext.properties. I used the Liferay setup wizard.
- I start and stop Websphere through Rational Application Developer for Websphere (see here). On windows you can also start stop the server using the IBM Websphere start menu tools.
Deploy Liferay
- Click Applications → New Application → New Enterprise Application.
- Browse to the Liferay .war file and click Next. I downloaded the Enterprise Edition 6.2 trial standalone. You will get an email with an xml license file.
- Leave Fast Path selected and click Next. Ensure that Distribute Application has been checked, and click Next again.
- Choose the Websphere runtimes and/or clusters where you want Liferay deployed. Click Next.
- Map Liferay to your preferred root context (/javacodegeeks/ for example) and click Next.
- Ensure that you have made all the correct choices and click Finish. When Liferay has installed, click Save to Master Configuration.
You’ve now installed Liferay, but don’t start it yet. If you wish to use PACL, you have one more thing to configure (see Enabling Security for Portal Access Control Lists section – Liferay documentation).
Starting Liferay
- Click Applications → Application Types → Websphere enterprise applications
- Select the Liferay .war checkbox and click start
- If no error shows up, go to
http://localhost:<yourport>/<your contextroot>
- If Liferay redirects you to a page that informs you that a license is missing. Drop the xml license file that Liferay sent you by email at
<WebsphereHome>\AppServer\profiles\<yourprofile>\Liferay\deploy\
and restart the server. You must see the Liferay portal basic configuration page. That means that you have successfully installed Liferay on Websphere application server. Enjoy!
Common issues
Identifying the ports
If you are not familiarized with the Websphere application server, like me, It may be difficult to find where the application server administration control and Liferay runs. The administration control of Websphere runs at http://localhost:9062/ibm/console/
in my case (the default port is 9063 I think). In your case the port may be different. You can also see the port where the administration console runs from Websphere logs when it starts. You can use again the windows start menu tools for IBM Websphere as shown at the picture 2 above.
Once you have successfully launched the administration console you can see a complete catalogue of the ports. Click Servers→Websphere application servers→<YourServerName>→ Configuration tab → Communications → Ports
As you can see the administrative console runs on port 9062 and Liferay should run on port 9082. So if the context root you have chosen is javacodegeeks Liferay should run at http://localhost:9082/javacodegeeks
Increasing JVM Maximum heap size
One other common issue is that when Liferay is deployed to WAS the pages are loaded very slow or keep hanging until java.lang.OutOfMemoryError
comes up and the server stops. We can easily increase WAW maximum heap size – in most cases it solves this issue.
In Websphere administration console:
- Click Servers -> Server Types -> Websphere application servers -> Server Infrastructure -> Java and Process Management -> Process definition.
- In Additional Properties section, select Java Virtual Machine
- In General Properties section, put 256 for “Initial heap size” and 1024 for “Maximum heap size”.
- Done, restart Websphere.