Now that you’ve performed the steps needed to prepare for your installation, you’re ready to install Liferay Portal! Since bundles are the easiest way to complete an installation, all the installation steps below assume a bundle has been installed. If you plan to install Liferay Portal manually, please refer to the article for your app server of choice, and then come back here to complete the configuration steps.
Now you’re ready. You’ve created a blank database for Liferay Portal and have gathered the credentials you need for your mail server. The next step is to install Liferay Portal.
Liferay Portal bundles contain the same folder structure regardless of application server. The top-level folder is named for the release of Liferay Portal. This folder is called Liferay Home. This folder is usually the parent folder of the application server’s folder. This is why Liferay Portal bundles place the application server inside the bundle’s root folder. On a manual installation, the location of this folder varies by application server. In a bundle, it’s part of the bundle. If you’re doing a manual installation, please refer to the article covering that app server for its location.
In the Liferay Home folder there are folders for various purposes:
- [Liferay Home]
patching-tool(Liferay Digital Enterprise 7.0 only)
- [Application Server]
data: This folder is used to store an embedded HSQL database, Liferay Portal’s file repository, and Liferay Portal’s search indexes. Liferay Portal is initially configured to use the embedded HSQL database but the HSQL database is primarily intended for demonstration and trial purposes. Portal property
jdbc.default.url sets the Hypersonic embedded HSQL database location.
deploy: To auto-deploy Liferay Portal plugins, copy them to this folder. Legacy style
.war files, Liferay Portal CE 7.0 style
.jar files, and
.lpkg files from Liferay Marketplace are supported. Portal property
auto.deploy.deploy.dir sets the auto-deploy location.
license: Liferay Portal’s copyright and version files are here.
logs: This folder contains Liferay Portal’s log files. The information in Liferay Portal’s log files can be quite valuable for system administrators, especially when trying to diagnose a problem.
portal-impl/src/META-INF/portal-log4j.xml file sets the location for the log files. To override the log file location, you must use an
ext-impl/src/META-INF/portal-log4j-ext.xml file in an Ext plugin.
osgi: All the JAR files and a few configuration files for Liferay Portal’s OSGi runtime belong in this folder. Portal property
module.framework.base.dir sets the OSGi folder location. Here are its subfolders:
configs: Component configuration files go here
core: Liferay Portal’s core modules
marketplace: Marketplace applications and application suites
modules: Modules you’ve deployed
portal: Liferay Portal’s non-core modules
state: Contains OSGi internal state files for such things as OSGi bundle installation, bundle storage, and more
target-platform: Target platform index
test: Modules that support test integration
war: WAR plugins you’ve deployed
patching-tool: This folder contains patches for Liferay Portal and files for installing the patches (Digital Enterprise 7.0 only).
tools: For portal upgrade and target platform indexer.
work: Module Jasper work files.
[Application Server]: The name of this folder is different depending on the bundle you’re using. This folder contains the application server in which Liferay Portal has been installed.
If Liferay Portal is unable to create the resources it needs in the Liferay Home folder or if it finds itself running on certain application servers, it creates a folder called
liferay in the home folder of the operating system user that is running Liferay Portal. In this case, the
liferay folder becomes Liferay Home. For example, if the operating system user’s name was jbloggs, the Liferay Home folder could be
Extracting a Liferay Portal Bundle
Getting a Liferay Portal bundle up and running is as easy as uncompressing the archive, possibly copying a JDBC driver, and then starting the application server. Let’s use the Liferay Portal Tomcat bundle as an example.
Unzip your Liferay Portal bundle.
If you’re setting up Liferay Portal to be an actual server, copy your database’s JDBC driver
[Tomcat]/lib/ext. If you’re using a supported open source database or if you’re setting up Liferay Portal for demo purposes, you can skip this step.
That’s it! You’ve extracted Liferay Portal, and it’s ready for use. This is much easier than doing a manual installation on an app server. If, however, that’s what you need to do, please at this point click the link on the left and go through the installation procedure for your app server of choice. When you’re finished with the installation (and before you’ve started Liferay Portal for the first time), come back to this spot, because you need to hook it up to your database.
Connecting Liferay Portal to Your Database
You can connect Liferay Portal through either your app server’s data source or the one that ships with Liferay Portal. Because of its suitability for tuning, it is recommended that you use the data source that ships with Liferay Portal. To do this, you’ll create a configuration file called
portal-ext.properties, and you’ll place that file in your Liferay Home folder.
The configuration varies by database, of course, so templates for each one are provided in the reference section. To connect your database, therefore, create a text file called
portal-ext.properties in your Liferay Home folder. Copy the relevant template for your database and paste it into this file.
Now all you have to do is customize it. Enter the proper host name and user and password credentials for your database, and then save the file.
Running Liferay Portal for the First Time
Next, start your app server, or start the Liferay Portal app in your app server. For example, if you’re using the Liferay Portal-Tomcat bundle, start Tomcat as if you had downloaded it manually. Tomcat is launched by invoking a script which is found in its
bin folder. If you open a command prompt or terminal and go to this folder, you can launch Tomcat via the following command on Windows:
or the following command on Linux/Mac/Unix:
The Liferay Portal Tomcat bundle then starts. 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
Liferay Portal writes log files to folder
The first time Liferay Portal starts, it’ll take a while to create all of its database tables. Once it has successfully started, it automatically launches a web browser that displays Liferay Portal’s Basic Configuration page. If for some reason your browser doesn’t load the Basic Configuration page, launch your web browser and navigate to http://localhost:8080.
Using Liferay Portal’s Setup Wizard
Liferay Portal’s Setup Wizard runs when you start Liferay Portal for the first time. To make it easy to configure Liferay Portal, the first thing you see when browsing to your newly installed Liferay Portal bundle is a setup wizard. The title of the setup wizard page is Basic Configuration. This page provides a convenient way to make an initial Liferay Portal configuration.
There are two sections of the wizard: the portal and the administrator. For the portal, you need to supply the following information:
Portal Name: the name of the portal you’re powering with Liferay Portal.
Default Language: choose the default locale of your portal.
For the administrator, you need to supply the following information:
First Name: the first name of the default administrator user
Last Name: the last name of the default administrator user
Email: the email address of the default administrator user
The Basic Configuration page also includes a checkbox labeled Add Sample Data. If you check this box, sample data is added to Liferay Portal’s database. This data includes users, sites, and organizations. The sample data allows many Liferay Portal features to be showcased. If you’re installing Liferay Portal on your own machine to explore its features, the sample data will probably be useful. If, however, you’re installing Liferay Portal on a real server, you should start with a clean system.
Once you’ve filled out the form, click Finish Configuration. The setup wizard creates a
portal-setup-wizard.properties file which stores the settings that you entered. When you begin customizing your portal’s configuration, however, you should use the
portal-ext.properties file you created earlier. All the possible properties that can be placed in this file are documented in our reference documentation.
After you’ve entered the information requested by the Basic Configuration page, Liferay Portal should bring you to its home page. You should set up your mail configuration next.
Now that Liferay Portal is up and running, log in as the administrative user you created in the setup wizard. Click the menu icon and then go to Control Panel → Server Administration → Mail, and have your mail credentials ready.
Fill out the form. You’re asked for the following information:
Incoming POP Server: The hostname for a server running the Post Office Protocol. Liferay Portal checks this mailbox for incoming messages, such as message board replies.
Incoming Port: The port on which the POP server is listening.
Use a Secure Network Connection: Use an encrypted connection when connecting to the POP server.
User Name: The user ID Liferay Portal should use to log into the POP server.
Password: The password Liferay Portal should use to log into the POP server.
Outgoing SMTP Server: The hostname for a server running the Simple Mail Transfer Protocol. Liferay Portal uses this server to send emails, such as password change emails and other notifications.
Outgoing Port: The port on which the SMTP server is listening.
Use a Secure Network Connection: Use an encrypted connection when connecting to the SMTP server.
User Name: The user ID Liferay Portal should use to log into the SMTP server.
Password: The password Liferay Portal should use to log into the SMTP server.
Manually specify additional JavaMail properties to override the above configuration: If there are additional properties you need to specify, supply them here.
When you’re finished setting up your mail configuration, click Save.
Your next step for basic Liferay Portal configuration is to convert the search implementation from its default demo mode into a production-ready mode.