Environment: Windows,Tomcat Server and Liferay 6.2CE with MySQL
Note:
I have used
windows 7 operating system .you can apply same steps to any environment. Only change
in setting environment variables and download software based on OS remaining
all are same for any operating system.
Required
Steps
- Install JDK and setting required environment variables (JAVA_HOME, path)
- Download MySQL server and Start MySQL server
- Download HeidiSQL and install(Optional)
- Connecting to MySQL server and create Database for Liferay
- Download Liferay 6.2 Tomcat Bundles
- Configure database setting in portal-ext.properties file and place properties file in Liferay Home directory.
- Start tomcat server and access Liferay Portal
- Complete required basic configurations for liferay portal
Install
JDK and setting required environment variables (JAVA_HOME, path)
We need to install JDK in our system and we need to
set java path environment variables
Down load java SDK 1.6 from
following location
Setting required environment variables
Go to your computer properties
Accessing System environment variables from
following screen.
Creating JAVA_HOME
variable as follows
Variable Name: JAVA_HOME
Variable Value: The path where your java installed
means JDK home directory
The following
screen shows you creating JAVA_HOME
Edith system path variable and specify
the java path
In the existed system path variable add java path
value (%JAVA_HOME%/bin)
In the System variables block you can see path variable,
select path variable and click on edit button.
Add java path as follows
Once click on edit in variable value you can see existed path variable.
You can add ;%JAVA_HOME%/bin; to
existed path value. Here each value is separated by semicolon.
This specify the java path which will used by java
applications and servers.
The following diagram shows edit the
system path variable
Download
MySQL server and Start MySQL server
Download MySQL
sever 5.1 from following location.
Extract the zip file in your desired
drive
Start MySQL database server
Open command prompt and go MySQL
bin directory (mysql-5.1.70-winx64/bin) then use following command to start MySQL database server
mysqld --console
|
Example:
The following is command prompt it start server and
I am showing last line which indicate data base server started successfully.
Download
HeidiSQL and install
Download HeidiSQL to access MySQL server databases. This is very
good user interface to access database and modifies the data base tables.
Download HeidiSQL from following location
The following screen shows you download page of HeidiSQL
Double click on exe file and follow the installation
steps to complete the successful installation.
HeidiSQL
is data base browser we can manage database. Its very light weight and user friendly.
Connecting
to MySQL server and create Database
for Liferay
We can do this in two ways
- Connecting MySQL from HeidiSQL and create Liferay Data base
- Connecting to MySQL from MS DOS command prompt and create data base for liferay
Connecting MySQL from HeidiSQL
and create Liferay Data base
Once successful installation of HeidiSQL, go to windows start and click on HeidiSQL.
In Login window enter following details and connect
to MySQL server.
Click on New and enter the following details
Host Name:
127.0.0.1 OR localhost
User: root
Password: nothing it’s empty
Once you successfully login you can see databases
view as follows
Create lportal
database for Lifera portal. Right click on root node and select create new
database
Enter database name lportal and click on Ok then database will be created
Connecting to MySQL from MS DOS command
prompt and create data base for liferay
This is another way to connecting to MySQL
server with windows command prompt
Open MS Dos command prompt from your system
Go to MySQL server bin directory
from command prompt and enter following command and press enter
It will ask
password no need to enter password (because our password is empty) and again
press enter
mysql
-u root –p
|
The following screen shows you admin login into
MySQL server
Now create data base using following command and
press enter then loprtal data base will be created.
create
database lportal;
|
Note:
Don’t forget semicolon end of the above SQL statement.
Download
Liferay 6.2 Tomcat bundle.
Download Liferay 6.2 Tomcat bundle from following
location
Now extract the Liferay 6.2 Tomcat Bundle Zip file in your desired
location of your system
Once you extract the zip file go to extracted folder then you can see following directories and files.
Note:
This extracted directory is called Liferay Home
Configure
database setting in portal-ext.properties
file and place properties file in Liferay
Home directory
Once you extracted the zip file then you can see liferay-potal-6.2.0-ce-rc4 directory
this is called Liferay Home directory
or we can say the directory which contains tomcat server is called Liferay Home directory
Create one file called portal-ext.properties
file in Lifeay Home Directory and
add following MySQL data base configurations.
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=
|
Note:
Here our data base name is lportal already we created in previous step. You can create any
database name of your choice but you need specify in portal-ext.properties file.
The following screen shows you portal-ext.properties
file in Liferay Home directory
Start
Tomcat server and access Liferay Portal
Go to Liferay Home and you can find tomcat (tomcat-7.0.40) directory
Open tomcat directory in side you can find bin directory
Open bin
directory double click on startup.bat then
tomcat server will be started.
The following screen shows tomcat bin directory startup.bat
Another way start tomcat server from
command prompt
Open command prompt and in command line go to tomcat
bin directory enter startup.bat and
press enter. Then tomcat server will be started.
As soon as you started the tomcat server from
command prompt you can see the Environment variables information.
The following screen shows you tomcat
server start from command prompt
As soon as
you double click on startup.bat or you start tomcat from command prompt either way
you can see following tomcat console in other window. It will show the log
information of liferay portal.
When you see the server startup in some seconds then
it indicates liferay application is started
The following screen shows server is
started.
Access Liferay Portal
Use following URL in browser address bar to access
liferay portal
Note:
Tomcat server default port is 8080 make sure no
other application should not run in same port otherwise you can see address
bind exception in console.
Complete
required basic configurations for liferay portal
Once access Liferay portal from above URL it will
show basic configuration page and we need to fill information like
Portal Name: anything your choice
Default Language: your choice from select box
Admin First Name: anything your choice
Admin Last Name: anything your choice
Admin Email: anything your choice (default is
test@liferay.com)
In data base section you can find our lportal congigurations
After fill the information click on Finish
Configuration button it will take few seconds to store
configurations.
Note:
Remember email which you have given, this is admin
email for next login.
The following is liferay portal basic
configuration page
As soon as you finished the basic configuration
these configuration stored in portal-setup-wizard.properties
this file available in Liferay Home directory
The following screen shows you portal-setup-wizard.properties path
Now go to your portal by clicking on Go
to My Portal button then you will get Liferay Terms and condition
page simple Click on I Agree
button
The following screen shows you liferay
terms and condition page
As soon as you click on I Agree button then it
will ask the password for administrator
The following screen ask you the
password for administrator
Note:
Remember Admin
email and password these are portal administrator credentials for next time
login. Portal administrator has full control over the portal.
Once you done with save the password then it will go
to password remainder screen. You can select any question and give the value
The following is Password Reminder web
page
After finish all above configuration then you can
see portal welcome page now your liferay portal is ready and you
can enjoy exploring the liferay portal.
The following is liferay portal welcome
page
Go through following liferay user guide to do more
things in your portal
https://www.liferay.com/documentation/liferay-portal/6.2/user-guide
Important
points
We have used liferay tomcat bundle portal we can get
many liferay portal with different servers.
When we start the server first time it will create
many tables and populated with default data.
This information you can see in
server console at time of liferay starting.
We can apply these steps for any environment only
difference is we need to download compatible software’s.
Author
Meera
Prince