Thursday, January 12, 2012

Liferay 6.1 GA1 in the cloud, step by step

Do you want your new Liferay 6.1 GA1, with all these new functionalities: english and spanish , in the cloud?

Follow this simple steps to achieve it, even if you want to use the new Setup Wizard:

  1. Go to Jelastic ( www.jelastic.com ), create an account depending of your location
  2. Create an enviroment: Tomcat + MySQL
  3. Upload portal libraries ( portal-client and dependencies ) to SERVER/lib.
  4. Upload WAR file from sourceforge ( here ) (Jelastic make it easy that uploading, because directly links to that WAR file)
  5. Create portal-ext.properties at SERVER, with this values:
    • resource.repositories.root=${user.home}/
      ENVIROMENT_NAME
      
    • include-and-override=${liferay.home}/portal-setup-wizard.properties
    • liferay.home=${user.home}/
      ENVIROMENT_NAME
      
    • jdbc.default.jndi.name=
      jdbc/LiferayPool
      
  6. Modify SERVER/context.xml file with this values (note that the "mysql-" is very important at db url):
    • <Resource name="
      jdbc/LiferayPool
      " auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="
      USER
      " password="
      PASSWORD
      " driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://
      mysql-ENVIROMENT_NAME
      .jelastic.com/
      DATABASE_NAME
      ?useEncoding=true&amp;characterEncoding=UTF-8" />
      
  7. Clean catalina.out log to be sure that your installation is successfull.
  8. Restart server.
  9. Check in catalina.out that Liferay starts reading your portal-ext
  10. Browse to you portal: ENVIROMENT_NAME.jelastic.com
  11. Setup Wizard is the first thing you'll see, but as JNDI is configured, we cannot modify database settings. We should go to SERVER/context.xml for database changes.
  12. Set up for portal (name, language, admin credentials), and...
  13. Here it is! Your portal up and running!

Then, you can tune your portal with portal-ext reminding not to modify properties set in this blog.

Importants (and new things):

As you can see, we are taking care of telling setup wizard where to read the new props file (the include-an-override property), and we are also configuring database with JNDI, but of course you can do it with JDBC, just with the usual way:

  • jdbc.default.driverClassName=com.mysql.jdbc.Driver
  • jdbc.default.url=jdbc:mysql://mysql-ENVIROMENT_NAME/database_name?

    useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false

  • jdbc.default.username=user
  • jdbc.default.password=password

Hope it helps!

Himanshu

No comments:

Post a Comment