How to deploy the Liferay Portal to the Jelastic cloud: Part II

By October 25, 2012 HowTo One Comment
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Liferay Portal is one of the most popular enterprise web platforms for building business solutions. We have already shown you how to deploy this great application to Jelastic Cloud and today we will continue to work with Liferay Portal: let’s configure the environment with the database for it.

Create the environment

1. Go to jelastic.com and sign up if you haven’t done it yet or log in with your Jelastic credentials by clicking the Sign In link on the page.

2. Click Create environment to set up a new environment in Jelastic.

3. In the Environment topology window, select Tomcat 7 as your application server, set the Cloudlets limit (e.g. 16), pick MySQL as the database you want to use and specify the number of Cloudlets for it. Then type your environment name, for example, liferay, and click Create:

In a minute your environment will be created and appears in the environments list.

Upload Java package

1. Go to the Liferay web site, navigate to Downloads and download the latest Liferay Portal Community Edition.

2. Extract the files from the archive you have downloaded.

3. On the Liferay web site, navigate to Additional Files and simply copy Liferay Portal x.x GA x WAR URL.

4. Upload the Liferay Java package to the Deployment manager via URL, you have just copied.

5. Once the package is in Jelastic, deploy it to the environment you have just created by clicking the Deploy button near the package name.

Configure database

1. Switch back to Jelastic dashboard and click Open in browser button for MySQL.

2. While you were creating the environment, Jelastic sent you an email with credentials to the database. Create an account and the database with the application using these credentials.

Configure Liferay

1. Go back to Jelastic dashboard, navigate to Tomcat section, click on Config button and upload the downloaded tomcat libraries Liferay application needs from the package you have downloaded earlier: liferay-portal-tomcat-x.x.x-xxxxxxxx/liferay-portal-x.x.x/ tomcat-x.0.xx/lib/ext.

5. Navigate to the home folder and click the New file button to create a new portal-ext.properties configuration file. Type the following string:

resource.repositories.root=${user.home}/liferay

In the same file enable MySQL:

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://mysql-{your_env_name}.{hoster_domain}/{db_name}?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=username
jdbc.default.password=password

Don’t forget to save the changes and restart Tomcat!

Start Liferay

1. Open your application in a web browser.

2. Create your account, confirm the configuration and click Go to My Portal.

3. Accept the license agreement.

4. Set the new password.

5. Now you can sign in and use Liferay with all its functionality! Enjoy!

Related article:

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

One Comment

  • […] of the most popular Java CMSs in the world due to its impressive ease-of-use. Since we published the tutorial on Liferay deployment to the cloud we have seen an extremely positive reaction from its community. Also we have received multiple […]

Leave a Reply

Subscribe to get the latest updates