Setting Up Liferay Portal 6.2 on GlassFish 4

This article documents how to install Liferay Portal 6.2 war on Oracle Glassfish 4.

Resolution

Required Files

  1. Download the GlassFish 4 server zip file; available on the GlassFish Server Open Source Edition 4.0 download page.
  2. Download the Liferay Portal 6.2 war available through Liferay's customer portal page.
  3. Dependencies:
    • hsql.jar
    • jta.jar
    • jtds.jar
    • junit.jar
    • jutf7.jar
    • mail.jar
    • mysql.jar
    • persistence.jar
    • portal-service.jar
    • portlet.jar
    • postgresql.jar
    • script-10.jar
    • servlet-api.jar

Configuring the Domain

  1. Unzip the GlassFish 4 server zip file. GlassFish 4 home is found \..\glassfish4\glassfish. This folder will be called ${GlassFish HOME}.
  2. Navigate to ${GlassFish HOME}\domains\domain1\lib. Add all the dependencies to this folder.
  3. Modify the domain.xml to set the file encoding, time zone, protocol stack, and increase the default amount of memory available. Navigate to ${GlassFish HOME}\domains\domain1\config and open the domain.xml file. Insert the following:
    -Dfile.encoding=UTF-8
    -Djava.net.preferIPv4Stack=true
    -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
    -Duser.timezone=GMT
    -Xmx1024m
    -XX:MaxPermSize=512m
    
  4. There may be multiple lists of JVM options in the domain.xml file. For example, by default, the domain.xml contains two lists of JVM options. There is one list inside of the element’s element and another inside of the element’s element. In both lists of JVM options, replace any existing options with the new values specified above.
  5. Delete the \domain1\docroot\index.html file.

Installing Liferay Portal

  1. Start the application server.
  2. Navigate to http://localhost:4848
  3. Click Application in the left navigation tree.
  4. Click Deploy
  5. Under Packaged File to Be Uploaded to the Server, click Choose File and browse to the location of the Liferay Portal .war file.
  6. Enter "/" in the Context Root field.
  7. Enter a name in the Application Name field.
  8. Click OK
  9. Navigate to http://localhost:8080

Additional Information

See our Official Documentation Guide here: Installing Liferay on Glassfish 4

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助