Table of Contents
Liferay was built from the ground up to be used by application service providers. By installing multiple portal instances a complate isolation of the users, organizations, locations, communities and any other data created through Liferay's portlets is achieved. This is possible because all of the tables used by Liferay have a column called companyId that identifies the portal instance to which the entry belongs.
The following is a sample list of portals running off of one portal instance hitting one database and shows the capabilities of Liferay: http://demo.liferay.net, http://my.ccuc.net, http://my.3sixteen.com, http://www.gatewayfriends.org, http://www.jasonandiris.com. Users in each of these portals have no information about the other portals. They are separated by domain and each portal exists in its own space based on the company's id.
The installation of multiple portal instances is specific to each application server. Following detailed steps for the most common ones are provided. These instructions assume that one instance of Liferay Portal is already installed and is working. Two example domain names, www.alpha.com and www.beta.com will be used, change them with the real ones for a live environment. Finally, although these instructions are for only two instances, the same process can be applied to add as many instances as supported by the system resources.
The following steps are common for all applications servers:
Stop the application server
Edit the hosts
system file
(C:\Windows\system32\drivers\etc\hosts
in
windows and /etc/hosts
in Linux/UNIX) so that
www.alpha.com and
www.beta.com resolve to your local machine.
This will help in testing the setup.
127.0.0.1 www.alpha.com 127.0.0.1 www.beta.com
Use a database running in server mode. If HSQL is being used, it is possible to configure it to run in server mode but we recommend using MySQL, PostgreSQL or any production-ready database instead. Follow the instructions in the previous sections for more information on how to configure the database that Liferay Portal is using.
It is recommended to start with a clean database. The new instances will use it's own data so existing data will not be accessible from them.