This post is part of
Liferay Portal 7 Getting Started Guide Series.
It's time to get started with Liferay Portal setup by
following below quick steps.
Environment
- Windows 7 [***NOTE - I have used mentioned environment, but similar steps should work even if you use different OS]
Software Requirements
- Install JDK 1.8 or later (Liferay portal setup can run with JRE, but better to install JDK as it will be required for development environment)
- Install MySQL or choice of Liferay supported database (This is optional, but good to have for development environment. At the same time, if you want to setup liferay portal just for quick demo or trial purpose, then you can skip database setup)
- Liferay Portal Download - Go to latest "7.0.x GA" version folder and download "liferay portal bundled with tomcat / wildfly as per your choice". For example, liferay-portal-tomcat-7.0-ce-ga1-20160331161017956.zip / liferay-portal-wildfly-7.0-ce-ga1-20160331161017956.zip.
Setup Liferay Portal
Unzip Liferay Portal:
First of all, unzip downloaded liferay portal bundled with *tomcat* or
*wildfly*. For example, I used
"liferay-portal-tomcat-7.0-ce-ga1-20160331161017956.zip" to unzip it.
Then, create "portal-ext.properties" file in its home folder.
Database configuration for
Liferay Portal (Optional, but recommended): By default it comes with
embedded "HSQL" database. However, I recommend to configuration it to
use your choice of database such as MySQL (Liferay supports range of databases,
but for exact supported version you need to refer "Liferay support
matrix") for development purpose. Still if you want to setup liferay
portal just for demo or trial purpose, then you can skip this step. If you skip
database configuration, liferay considers default "HSQL" database to
persist in "data" folder.
- Choose a database server and create a new database, for example I created "lportal-70-ce-ga1" database in MySQL. Here, (i) Create a blank database encoded with the character set UTF-8. Liferay Portal is a multilingual application and needs UTF-8 encoding to display all of its supported character sets. (ii) Create a database user for accessing this database. Grant this database user all rights, including the rights to create and drop tables, to the blank Liferay database.
- Then, ensure to do correct database configuration in portal-ext.properties file (as per liferay database template). The created database name must match in "jdbc.default.url" value of portal-ext.properties file. Add respective database driver jar file underneath Liferay Portal @ "$TOMCAT_HOME/lib/ext" or "$WILDFLY_HOME/modules/com/liferay/portal/main" folder, if doesn't exist there already.
Start Liferay Portal:
Now, start liferay portal for the first time by executing script in
"bin" of tomcat/wildfly and . For example, run
"Liferay/tomcat/bin/startup.bat". Liferay automatically starts
creating required table and some initial setup stuff. Wait… wait… for 5-10
minutes. You should not get any exception, when liferay is doing its first time
setup stuff. At the end, you should see "server start up in x ms"
message and it would open Liferay's setup wizard (http://localhost:8080/) in the browser.
Finish Liferay Setup Wizard
and Restart Portal: Finally, in Liferay's setup wizard, click
"Finish Configuration" button followed by restarting the portal as
per the liferay instruction. To restart, stop running startup process (CTL+C)
and run it again. Again, wait for 5 minutes or so. At the end, you should see "server start
up in x ms" message and it would open Liferay portal (http://localhost:8080/) in the browser. (*Note: If you refresh you database, you
should see that Liferay would have created required tables along with initial
data.)
Start Exploring Liferay
Portal: Congratulations, you are done with liferay portal setup.
"Sign In" using "username / password" as default
"test@liferay.com / test" admin user. On first login, it asks for
agreement and changing password. Just start playing with out-of-box features of liferay portal as per user guide. For example, you can add application or content
on given page (i.e. Add -> Search "Blogs" -> Click
"Add" of "Blogs"), create new pages (Menu -> Liferay
-> Navigation -> Public Pages -> Add Public Page), control panel for
portal configuration or managing users / sites / apps, etc.
Refer liferay portal documentation for more setup options.
What's next?
Obviously, just
Liferay's out-of-box features or functionality could not be sufficient to
accomplish given business use cases. Do you have requirements of customizing
liferay provided functionality (via various configuration options or
implementing hook plugins) or incorporating custom developed liferay plugins
into Liferay portal (in form of portlets, themes, etc.)? Then, let's get
started with understanding liferay development tooling options.
No comments:
Post a Comment