Ask a question
Thursday, 06 August 2009 13:19

Installing Liferay

Rate this item
(1 vote)

Installing Liferay on your machine is easy. The Liferay portal comes bundled with manypopular web and application servers that are free for distribution. Liferay also supports manycommercial servers, which you would have to obtain separately. If you are using any of thecommercial servers, you will need to install and configure Liferay for these servers by followingthe instructions in the Liferay installation guide. 

Some of the popular free servers bundled with Liferay are:

• Geronimo
• GlassFish
• JBoss
• Jetty
• Pramati
• Resin
• Tomcat

It is easy to set up a bundled installation. Liferay recommends the use of Tomcat as abundled option because it’s lightweight and popular among developers. We’ll use Tomcat forthe examples in this book.

Downloading Liferay

You can download the Liferay installation from the official Liferay site ( On this page, you will find several bundles for download. Under“Liferay Portal Standard Edition,” download Liferay Portal Bundled with Tomcat 6.0 (at presstime, the current Liferay version was 5.1.2 and the current Tomcat version was 6.0).After you select the Tomcat 6.0 option, the browser redirects to andbegins the download automatically. The name of your downloaded file is

Setting Up J2SE

Before you set up Liferay, you need to download and install Java on your machine. If you haveJava 2 Platform, Standard Edition (J2SE) 1.5 or above already installed, you can skip this step.You can download the latest J2SE version from (Java SE 6 Update 10 RC, at press time). The name of the downloaded file isjre-6u10-rc2-bin-b31-windows-i586-p-05_sep_2008.exe.To set up Java on your machine, simply double-click the installer. The setup wizardguides you through the entire installation procedure. After the installation completes successfully,you will need to set the following environment variables.Create a new system variable called JAVA_HOME and set its value to your installation folder.For example, if you selected C:\Java\jdk1.6.0_02 as the installation folder, use this completepath as the value for the JAVA_HOME environment variable. You will then need to modify the systemPATH variable. Add the value %JAVA_HOME%\bin to the beginning of the path.

Setting Up Liferay

Setting up Liferay on your machine is easy: simply extract the contents of the downloadedfile to any folder on your machine. For the purposes of this book, I’ll assume that the files areextracted to the root folder of the C partition. When you extract the files to C:\, you will noticethat the installation creates a folder called liferay-portal-tomcat-6.0-5.1.2 in C:\. That’s allyou need to do to set up Liferay.

If you examine the contents of the installation folder, you will find several subfolders. Thebin subfolder contains the binaries for starting and stopping the server, whereas the webappssubfolder contains the installed web applications. The lib subfolder holds the various runtime libraries. You will be examining the contents of these folders when you deploy your custommadethemes and portlets for your portal. Even the third-party themes and portlets providedby Liferay user communities are deployed to these folders. You will need to navigate to the binfolder to start and stop the Tomcat server. When you start the Tomcat server, Liferay automaticallystarts and is ready to use.

Testing the Liferay Installation

To start Liferay, navigate to the c:\ liferay-portal-tomcat-6.0-5.1.2\bin folder and doubleclickthe startup batch file. This opens a console window and starts Tomcat server. The serverstartup messages are displayed in the console window. When the server completes its startup,you are ready to use Liferay.Open the browser and type the following URL:


You will see the page shown in Figure 1-17 displayed in your browser.

Figure 1-17. Liferay startup page

You can now log in to the portal using the following information:

Login: This e-mail address is being protected from spambots. You need JavaScript enabled to view it
Password: test

Accept the Terms of Use on the next page. Upon logging in successfully, you will see the
page shown in Figure 1-18.

 Figure 1-18. Liferay portal page upon successful login

Note the welcome message shown in the top-right corner. The default user for this portalis Joe Bloggs, whose name also appears in the Sign In portlet. The Hello World portlet showsanother welcome message along with the current build version of the Liferay portal. At thisstage, you have set up Liferay on your machine and are ready to explore further and createyour own portals.To shut down Liferay, you will have to shut down the Tomcat server. You can do so byrunning the shutdown batch file provided in the bin folder of the Liferay installation.


Last modified on Sunday, 16 August 2009 10:44


E-mail: This e-mail address is being protected from spambots. You need JavaScript enabled to view it
More in this category: « Liferay Features