Liferay 7 Installation

Liferay have announced Liferay 7 Community Edition Milestone 4.They have conducted program called Liferay 7 Community Expedition Program so that interested people can join in the program they can test and experience the Liferay 7 portal.

Liferay released liferay-portal-7.0-ce-m4 and we can download portal server bundle and we can explore new featured and we can give feedback to Liferay community so that it will improve the next official release of Liferay 7


The following is download URL for Liferay 7(liferay-portal-7.0-ce-m4)

The following link for Liferay 7 Tomcat Bundle


Liferay 7 Bundle consist following things

Tomcat server with deployed Liferay Portal

Data Directory this folder contains document library and hsqldatabase this is default database for Liferay.

The following screen shows what Liferay Portal Server Bundle contains.



Liferay 7 Unsupported Class Version Error with Java 1.6

When we run this bundle with java 1.6 versions (jdk/jre 1.6) then we will get Unsupported Class Version Error.

Liferay 7 Portal (ROOT) was compiled and packaged with JDK/JRE 1.7 so when we use JAVA 1.6 then we can face Unsupported Class Version Error

Generally when we install Java in our machined we set the JAVA_HOME environment variable so when we start Tomcat Server it will look for JAVA_HOMEvariable and this will point to our JRE/JDKhome directory so that tomcat will use this and start the server successfully.

When we run Liferay Portal 7 and our system have java 1.6 then portal won’t be started and it will give above error.

Solution:

Install JDK 1.7

We need to download JDK1.7 and install into local machine then we need to set JAVA_HOME system environment variable so that we can run Liferay 7 portal.

Download JDK1.7 from following URL


Install JDK then it will be available in C:\Program Files\Java

Set JAVA_HOME environment variables as follows

Variable Name
JAVA_HOME
Value
C:\Program Files\Java\jdk1.7.0_75


Scenario:

Assume we are running some applications and servers in JAVA 1.6 then we don’t want to change JAVA_HOME variable to java 1.7. But we wanted run Liferay 7 portal

This scenario we will use setenv.bat/setenv.sh files which is in Tomcat Server “bin”directory there we will explicitly configure Java 1.7 only for this server so that whenever we start Liferay 7 bundle tomcat server then it will use java 1.7.

Easy Steps:
  1. Download JDK 1.7 and install  
  2. Copy JRE 1.7 and place in Liferay 7 Portal Tomcat server
  3. Open setenv.bat/setenv.sh then set java home

Download JDK 1.7 and install 

Download JDK1.7 from following URL


Install JDK then it will be available in C:\Program Files\Java


Copy JRE 1.7 and place in Liferay 7 Portal Tomcat server

Now copy just jre7folder from C:\Program Files\Java place this in tomcat server
Create one directory in liferay-portal-7.0-ce-m4\tomcat-7.0.42say “win” then place jre7 in this newly created directory.




 The following screen shows that JRE7 available in “win” directory


Open setenv.bat/setenv.sh then set java home

Now go to “tomcat-7.0.42\bin” directory open setenv.bat in editor if you are using windows OS otherwise use setenv.sh

Replace the existed content with following content


set "JAVA_HOME=%CATALINA_HOME%/win/jre7"

set "CATALINA_OPTS=%CATALINA_OPTS% -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true  -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"


Finally save the file and start tomcat serve then Liferay portal will start successfully by using jre7.

Launch portal with www.localhost:8080

Complete basic configuration steps and you explore Liferay 7 portal.

Liferay default use there hsql database if you want to change to other database engine create portal-ext.propertiesfile Liferay Home directory then configure database connection details.

Follow the post which is for Liferay 6.2 Installation same you can replicate to Liferay 7.


Liferay 7 Portal Screen


Note:

When we install JDK 1.7 then default java will be latest installed one even we explicitly create JAVA_HOME that point to JAVA1.6.

To make java 1.6 as your default JAVA for your system then go to “C:\Windows\System32” look for java.exe, javaw.exe and javaws.exe files and delete it so that your default java in your machine will be java 1.6 that we set in the JAVA_HOME.

Share on Google Plus

About Meera Prince

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment