Liferay Portal 5.2.3 & 6.0.1 RC quick install

Hi there!

In the last two months I had to perform many Liferay instalations with different configurations, here I put some quick notes for a clean installation of Liferay (for version 5.2.3 and 6.0.1 RC1) very necessary if we want to develop applications on Liferay.

Liferay Portal 6.0.1 RC1
Liferay Portal 6.0.1 RC1

1. Unzip liferay-portal-XXX.zip in %LIFERAY_HOME%

2. Change the default portsand avoid conflicts. Edit the file %LIFERAY_HOME%\tomcat-YYY\conf\server.xml and change the follow ports:

8080 -> 9090
8005 -> 9005
8443 -> 9443
8009 -> 9009

3. Edit the Pool connection in %LIFERAY_PORTAL%\tomcat-YYY\webapps\ROOT\WEB-INF\classes\portal-ext.properties (this file is not included in 5.2.3 and 6.0.1 bundle)

portal-ext.properties
jdbc.default.jndi.name=jdbc/LiferayPool

4. Edit %LIFERAY_HOME%\tomcat-YYY\conf\Catalina\localhost\ROOT.xml file and to add database (i.e. mysql) connection.

ROOT.xml
[…]
<Resource
name=”jdbc/LiferayPool”
auth=”Container”
type=”javax.sql.DataSource”
driverClassName=”com.mysql.jdbc.Driver”
url=”jdbc:mysql://localhost:3306/lportal_db?useUnicode=true&amp;characterEncoding=UTF-8″
username=”root”
password=””
maxActive=”20″
/>
[…]
</Context>

5. Ensure that the MySQL JDBC Driver exists in %LIFERAY_HOME%\tomcat-YYY\lib\ext folder.

6. Create an empty Database with the necessary rights. Execute the follow sql command:

CREATE DATABASE lportal_db CHARACTER SET utf8;
GRANT ALL ON lportal_db.* TO “YourUserName“@”localhost”;

7. Start Liferay Portal server. Execute %LIFERAY_HOME%\tomcat-YYY\bin\startup.bat

These notes also apply to linux too.

Bye.

@Chilcano

Tagged with:
Posted in Linux
3 comments on “Liferay Portal 5.2.3 & 6.0.1 RC quick install
  1. troya says:

    I try your article for my Liferay Instalation.
    i have followed All of step from your article.
    But, when i start tomcat, database on mysql not filled by Liferay.That still empty.

    Any idea with it ?

    • Is probably that Liferay is not able to connect to your database with the username and password indicated in ROOT.xml. In my case, I use usr=”root” and pwd=”” (empty). Liferay and mysql are on the same host.
      See the logs displayed in the console when starting Liferay.
      Liferay creates all the tables the first time you start.

      Bye.

  2. BBhair says:

    typically how long should the upgrade from 5 to 6 take?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
%d bloggers like this: