« Back

Liferay 6.1 GA1 in the cloud, step by step

Company Blogs January 12, 2012 By Manuel de la Peña Staff

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 (www.jelastic.com), 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 portal-ext.properties at SERVER_ROOT/home, 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_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://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_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://mysql-ENVIROMENT_NAME.jelastic.com/database_name?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
  • jdbc.default.username=user
  • jdbc.default.password=password

Hope it helps!

Manuel

Threaded Replies Author Date
I was wondering how to do this. Thanks for your... Bradley Wood January 12, 2012 10:45 AM
what do you mean create portal-ext.properties... Bradley Wood January 12, 2012 11:14 AM
Same issue as Bradley : Step 5 Create... Brian Jamieson January 12, 2012 12:33 PM
Are you using Tomcat 7 and MySQL 5.0? Bradley Wood January 12, 2012 4:45 PM
Hey Bradley, I'm using Tomcat 6. I've updatet... Manuel de la Peña January 12, 2012 11:22 PM
I'm still getting the errors, I am following... Bradley Wood January 13, 2012 12:02 AM
This error is the key problem :)... Manuel de la Peña January 13, 2012 3:30 AM
where might I find that file. mysql.jar? Bradley Wood January 13, 2012 9:54 AM
Hi Bradley, If like me you have a local... Brian Jamieson January 13, 2012 10:10 AM
Good one. Thanks for sharing the information Kamesh Sampath January 15, 2012 8:31 AM
Hey Bradley, did you get the MySQL driver? As... Manuel de la Peña January 15, 2012 11:21 PM
I have tried all of these steps several times... Bradley Wood January 15, 2012 11:47 PM
Thanks for the post. Any experience with... Pius Onobhayedo January 17, 2012 1:57 AM
Hi Manuel, I've successfully deployed Liferay... Marco Re January 17, 2012 6:17 AM
Hi Marco See Tomcat logs and ask jelastic... Manuel de la Peña January 17, 2012 6:47 AM
Still having issues getting it to work, I must... Bradley Wood January 20, 2012 2:13 PM
Use below link to download MySQL connector.... Ramalingam G February 1, 2012 9:47 AM
I am still getting errors.... Bradley Wood February 1, 2012 10:22 AM
Hello Brad, I believe you need more jar files... Manuel de la Peña February 1, 2012 10:32 AM
Still no luck I added the files from the... Bradley Wood February 1, 2012 10:52 AM
I don't use "lib/ext", just directly inside "lib" Manuel de la Peña February 1, 2012 11:31 AM
Works like a charm! Thanks for this post, it... Daniele Ulrich April 17, 2012 3:15 AM
z Cesar Quinteiro April 18, 2012 10:21 AM
I am no able to go thru Basic Configuration... Cesar Quinteiro April 18, 2012 10:24 AM
Hi Cesar. Do you have javascript errors or is... Manuel de la Peña April 18, 2012 11:37 AM
Hi Manuel no any, you can check in... Cesar Quinteiro April 19, 2012 6:53 AM
Hi Cesar I can see that you have configured a... Manuel de la Peña April 19, 2012 7:15 AM
Hi Manuel And how can you see that? if in... Cesar Quinteiro April 19, 2012 8:54 AM
Please create a post in the forums, it will be... Manuel de la Peña April 19, 2012 11:50 PM
Hi. This is very valuable information. I am... Carlos Adolfo Ortiz Quirós June 21, 2012 6:57 AM

Bradley Wood
I was wondering how to do this. Thanks for your blog post. very helpful!
Posted on 1/12/12 10:45 AM.
Bradley Wood
what do you mean create portal-ext.properties at SERVER is that within the home folder? because it didn't let me add the file in the SERVER folder
Posted on 1/12/12 11:14 AM.
Same issue as Bradley : Step 5 Create portal-ext.properties at SERVER.

Confused over what 'SERVER' is : root of 'ENVIRONMENT_NAME' ???

SERVER/lib should be /lib ? (Seems to be where to store our jar files)

SERVER/context.xml should be /server/context.xml (since the file exists already).

If so then we can't create files in /server or /
Posted on 1/12/12 12:33 PM.
Bradley Wood
Are you using Tomcat 7 and MySQL 5.0?
Posted on 1/12/12 4:45 PM.
Hey Bradley, I'm using Tomcat 6.

I've updatet post to clarify about folders used and tomcat enviroment.

Thanks for your feedback!
Posted on 1/12/12 11:22 PM in reply to Bradley Wood.
Bradley Wood
I'm still getting the errors, I am following the steps the same. here is on of my errors:

http://pastie.org/3176980
Posted on 1/13/12 12:02 AM in reply to Manuel de la Peña.
This error is the key problem emoticon
java.sql.SQLException: No suitable driver

Add your database driver (MySQL) to SERVER_ROOT/lib

Cheers!
Posted on 1/13/12 3:30 AM in reply to Bradley Wood.
Bradley Wood
where might I find that file. mysql.jar?
Posted on 1/13/12 9:54 AM in reply to Manuel de la Peña.
Hi Bradley,
If like me you have a local development copy of liferay with the tomcat bundle, you should find the file here (assuming linux install for user 'liferay'):

/home/liferay/bundles/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/lib/e­xt/

Hope that helps.

By the way. my test installation works correctly.

Manuel beat me to the punch of the home directory... From the jelastic docs:

variable path in Jelastic applications
user.home -> /opt/tomcat/temp
us­er.dir -> /opt/tomcat/temp
java.io.tmpdir -> /opt/tomcat/­temp
java.home -> /usr/java/latest
catalina.home ­-> /opt/tomcat/
catalina.base -> /opt/tomcat/
Posted on 1/13/12 10:10 AM in reply to Bradley Wood.
Good one. Thanks for sharing the information
Posted on 1/15/12 8:31 AM.
Hey Bradley, did you get the MySQL driver?

As Brian said, it's inside Liferay's Tomcat bundle.
Let me know if you get it

Cheers!
Posted on 1/15/12 11:21 PM.
Bradley Wood
I have tried all of these steps several times and included the lib from the lib/ext folder of the 6.1ce bundle, and still can't get it to work
Posted on 1/15/12 11:47 PM in reply to Manuel de la Peña.
Thanks for the post. Any experience with cloudbees? Jelastic seems to be taking their time to release pricing information, hence it doesn't make much business sense to base cloud deployment plan on it.
Posted on 1/17/12 1:57 AM in reply to Bradley Wood.
Hi Manuel, I've successfully deployed Liferay 6.1 GA1 in my free jelastic environment but after few clicks on control panel the portal became unavailable due disk quota exception ....have you some advice on this ? Thanks!

Marco
Posted on 1/17/12 6:17 AM.
Hi Marco

See Tomcat logs and ask jelastic support, they are very effective ;)

Cheers!
Posted on 1/17/12 6:47 AM in reply to Marco Re.
Bradley Wood
Still having issues getting it to work, I must be missing one little detail, can you help. Where do I get the JDBC driver from? is its name mysql.jar?
Posted on 1/20/12 2:13 PM in reply to Manuel de la Peña.
Use below link to download MySQL connector. Then unzip and find mysql-connector-java-5.1.18.jar. Upload mysql-connector-java-5.1.18.jar into Jelastic Tomcat lib/ or lib/ext folder and restart

http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.1­8.zip/from/http://ftp.jaist.ac.jp/pub/mysql/
Posted on 2/1/12 9:47 AM in reply to Bradley Wood.
Bradley Wood
I am still getting errors. http://pastie.org/3297305
Posted on 2/1/12 10:22 AM in reply to Ramalingam G.
Hello Brad, I believe you need more jar files (activation.jar)

Here is an image with mine: http://yfrog.com/j8ua8ip

Make sure all liferay's dependencies are deployed to your server.

Bye!
Posted on 2/1/12 10:32 AM in reply to Bradley Wood.
Bradley Wood
Still no luck I added the files from the 6.1.0CE bundle in the lib/ext not sure how to get it working
Posted on 2/1/12 10:52 AM in reply to Manuel de la Peña.
I don't use "lib/ext", just directly inside "lib"
Posted on 2/1/12 11:31 AM in reply to Bradley Wood.
Works like a charm! Thanks for this post, it was very helpful.
I had 3 issues:
- somehow the portal.jar from dependencies did not work; I replaced it by the one with the complete installation bundled with tomcat 7, then it worked
- jta.jar and hibernate-jpa-2.0 was missing; I'm using tomcat 6 on JDK 6
Here the links to the missing jars:

http://repo1.maven.org/maven2/org/hibernate/javax/persistence/hibernate-jpa­-2.0-api/1.0.1.Final/hibernate-jpa-2.0-api-1.0.1.Final.jar
http://repo1.maven.org­/maven2/javax/transaction/jta/1.1/jta-1.1.jar

Thanks a lot!
Posted on 4/17/12 3:15 AM in reply to Manuel de la Peña.
Posted on 4/18/12 10:21 AM.
I am no able to go thru Basic Configuration form, I fill I press finish configuration, and nothing happens, I check log and nothing there, I restart server, check the database Mysql and tables are there, but not way to get into welcome page.
Posted on 4/18/12 10:24 AM.
Hi Cesar.

Do you have javascript errors or is javascript enabled?
Posted on 4/18/12 11:37 AM in reply to Cesar Quinteiro.
Hi Manuel

no any, you can check in http://intergalt6.jelastic.dogado.eu/
Posted on 4/19/12 6:53 AM in reply to Manuel de la Peña.
Hi Cesar

I can see that you have configured a cluster in your installation.
Which properties (relatives to clustering) do you have in portal-ext?

Cheers!
Posted on 4/19/12 7:15 AM in reply to Cesar Quinteiro.
Hi Manuel

And how can you see that? if in cluster was not willfully, I just follow the instructions of this blog, were is that portal-ext file?

BTW, Search for that file I found a Liferay.Log file that maybe is root of the problem:

It mentions a problem related with connection with database
java.net.SocketException
MESSAGE: Broken pipe

Is estrange because in first start all the files of liferay were created in the MySql database, then db configuration is fine
Posted on 4/19/12 8:54 AM in reply to Manuel de la Peña.
Please create a post in the forums, it will be better for everybody to continue solving this there emoticon

Cheers!
Posted on 4/19/12 11:50 PM in reply to Cesar Quinteiro.
Hi.

This is very valuable information. I am about to enter the research mode for cloud computing around Liferay, and this is very refreshing to read about. It is a pity nobody has commented more on this subject. Perhaps I open a forum or search one where this has been discussed.
Posted on 6/21/12 6:57 AM.