Documentation
Liferay provides a rich store of resources and knowledge to help our community better use and work with our technology.
Installing a bundle
Liferay bundles contain the same directory structure regardless of application server. The top-level folder is named for the release of Liferay. This folder is called Liferay Home, and we refer to it thoughout this documentation.
Figure 11.1: Bundle directory structure
Inside this folder, there are folders for various purposes:
Data: This folder is used to store the embedded HSQL database which the bundles use, as well as the configuration and data for the Jackrabbit JSR-170 content repository and the Lucene search index.
Deploy: Plugins which you wish to deploy to Liferay can be copied into this folder. It is also used by Liferay Marketplace and Liferay's graphical plugin installer utility.
[Application Server]: The name of this folder is different depending on which bundle you have downloaded. This folder contains the application server in which Liferay has been installed.
Installing a bundle is as easy as uncompressing the archive, copying a JDBC driver, and then starting the application server. Let's use the Tomcat bundle as an example:
Unzip the bundle to a location of your choice.
If you're setting up Liferay to be an actual server, copy your database's JDBC driver
.jarto[Tomcat]/lib/ext(see the setup wizard section below). If you're setting up Liferay for demo purposes, you can skip this step.Start Tomcat in the same way as you would if you had downloaded it manually. Tomcat is launched by way of a script which is found in its
binfolder. If you drop to a command prompt and go to this folder, you can launch Tomcat via the following command on Windows:startup
or the following command on Linux/Mac/Unix:
./startup.sh
The Liferay/Tomcat bundle then launches. If you are on Windows, another command prompt window appears with Tomcat's console in it. If you are on Linux, you can see the Tomcat console by issuing the following command:
tail -f ../logs/catalina.out
Once Tomcat has completed its start up, it automatically launches a web browser that displays Liferay's setup wizard. If for some reason your browser doesn't load the wizard, launch your web browser and then go to http://localhost:8080.
Liferay CE ships with a sample web site for a fictitious company called 7Cogs. This site demonstrates some of the things Liferay Portal can do. If you're installing Liferay on your own machine to explore its features, you likely want to leave the sample site there so you can examine it. If, however, you're installing Liferay on your server to run your own site, it's best to start with a clean system. Before running the setup wizard, you should remove the sample 7Cogs data from your Liferay installation. You must do this before running the setup wizard in order to get a clean database, and it's as simple as undeploying the application that installs the 7Cogs data.
There is only one application included in the bundle that you need to remove. It's called sevencogs-hook. It's a Liferay plugin that copies the 7Cogs data into the database when Liferay is started. To remove it, all you have to do is undeploy it. The method for doing this differs by application server and that, of course, depends on the bundle you have chosen. For example, on Tomcat you delete the application from the [Tomcat Home]/webapps folder. On Glassfish, you use the administrative console to undeploy it. The other application related to 7Cogs is a theme, which you can leave installed if you wish.
If you forget to undeploy the sevencogs-hook application before you run through the setup wizard and connect Liferay to your real database, the sample data will be created in your database and may cause issues with your site. Make sure that you get sevencogs-hook undeployed before setting up your server.
If you're using Liferay EE, you don't have the sample site, so you don't need to worry about this. The next step is to run through the setup wizard.