Thursday, 9 February 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 these simple steps to achieve it, even if you want to use the new Setup Wizard:
  1. Go to Jelastic (, create an account depending of your location
  2. Create an enviroment: Tomcat 6 + MySQL 5
  3. Upload portal libraries (portal-client and dependencies) to SERVER_ROOT/lib. Include here JDBC driver for your database.
  4. Upload WAR file from sourceforge (here) (Jelastic make it easy that uploading, because directly links to that WAR file)
  5. Create at SERVER_ROOT/home, with this values:
    • resource.repositories.root=${user.home}/ENVIROMENT_NAME
    • include-and-override=${liferay.home}/
    • liferay.home=${user.home}/ENVIROMENT_NAME
  6. Modify SERVER_ROOT/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://;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:
  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_ROOT/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://
  • jdbc.default.username=user
  • jdbc.default.password=password
Hope it helps!

contributed by

No comments:

Post a Comment