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 you’re installing a Liferay Portal bundle. 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 Liferay Portal release. This folder is called Liferay Home. This folder is usually the application server’s parent 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.
Liferay Home has folders for various purposes:
- [Application Server]: The name of this folder varies depending on the bundle you’re using. This folder contains the application server in which Liferay Portal has been installed.
data: Stores 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.urlsets the Hypersonic embedded HSQL database location.
deploy: To auto-deploy Liferay Portal plugins, copy them to this folder. Legacy style
.warfiles, Liferay Portal CE 7.1 style
.lpkgfiles from Liferay Marketplace are supported. Portal property
auto.deploy.deploy.dirsets 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.xmlfile 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.xmlfile 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.dirsets 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: (Liferay DXP only) This folder contains patches for Liferay Portal and files for installing the patches.
tools: For Liferay Portal upgrade and target platform indexer.
work: Module Jasper work files.
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 is jbloggs, the Liferay Home folder is
Extracting a Liferay Portal Bundle
Getting a Liferay Portal bundle up and running involves 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.
- Extract your Liferay Portal bundle.
- 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. Otherwise, copy your database’s JDBC driver
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 must hook it up to your database.
Connecting Liferay Portal to Your Database
You can connect to your database with JNDI on your app server or the data source shipped with Liferay Portal (recommended). Refer to the article on your app server for instructions on using JNDI. For the internal data source, you can configure it by specifying the configuration in a
portal-ext.properties file or the Setup Wizard:
portal-ext.propertiesfile in your Liferay Home folder.
Customize the configuration with the proper host name and user and password credentials for your database, and save the file.
You’re ready to start Liferay Portal.
Running Liferay Portal for the First Time
Next, start your app server, or start the Liferay Portal app in your app server. Liferay Portal writes log files to folder
The first time Liferay Portal starts, it creates all of its database tables. Once it has successfully started, it automatically launches a web browser that displays the Basic Configuration page. If for some reason your browser doesn’t load the Basic Configuration page, launch it and navigate to your app server’s address and port (for example, http://localhost:8080).
Using Liferay Portal’s Setup Wizard
The Setup Wizard runs when you start Liferay Portal for the first time. The title of the setup wizard page is Basic Configuration. This page provides a convenient way to make an initial 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 your database. This data includes users, sites, and organizations. The sample data is for demo purposes. If you’re installing Liferay Portal on your own machine to explore its features, the sample data may be useful. If, however, you’re installing Liferay Portal on a real server, 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, 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, the home page appears. You should set up your mail configuration next.
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 is to convert the search implementation from its default demo mode into a production-ready mode.