Liferay

Liferay Portal 4 - Installation Guide

Joseph Shum

Alexander Chow

Jorge Ferrer

Release Candidate 1

Revision History
Revision Updated:Thursday, November 27th, 2006

Table of Contents

Preface
1. Installation options
2. Installing a Liferay Bundle
1. Quick installation
2. Database configuration
3. Mail configuration
3. Detailed installation procedure
1. Application Servers
1.1. Borland ES 6.5
1.2. Geronimo
1.3. GlassFish
1.4. JBoss+Jetty 4.0.2
1.5. JBoss+Tomcat 4.0.2
1.6. Jetty 5.1.4
1.7. JFox
1.8. JOnAS+Jetty 4.4.3
1.9. JOnAS+Tomcat 4.4.3
1.10. JRun 4 Updater 3
1.11. OracleAS 10.1.2
1.12. Orion 2.0.6
1.13. Pramati 4.1
1.14. Resin 3.0.14
1.15. RexIP 2.5
1.16. Sun JSAS 8.01
1.17. Tomcat 5.0.x/5.5.x
1.18. WebLogic 8.1 SP4
1.19. WebSphere 6.0.2.5
1.20. WebSphere 5.1
2. Databases
2.1. DB2
2.2. Firebird
2.3. Hypersonic
2.4. InterBase
2.5. JDataStore
2.6. MySQL
2.7. Oracle
2.8. PostgreSQL
2.9. SAP
2.10. SQL Server
3. Mail Servers
3.1. Washington IMAP+Sendmail
3.2. Cyrus IMAP+Postfix
3.3. Dovecot+Postfix
3.4. Microsoft Exchange
4. LDAP Integration
1. Installing Apache Directory Server
2. Installing LDAP Browser
3. Inputting User in LDAP Browser
4. Integration
5. Upgrade notes
1. Portlet and theme ids
6. Conclusion

Preface

Intended audience. This document is intended as a complete installation guide for Liferay Portal 4.2. It is still a work in progress and will be updated frequently with new content. Contributions are welcome. It explains from the simplest installation methods intended for people reviewing Liferay to the most elaborate ones which will serve those wanting to install liferay in servers. All Liferay supported servers and databases are covered.

Liferay version. This guide has been written for Liferay 4.2. Some details might be different for previous versions of Liferay 4. Don't expect it to be accurate for even older versions.

Related documents. If this is not what you are looking for consider the following related documents

  • Liferay Portal 4 - Customization Guide

  • Liferay Portal 4 - Portal Users Guide

  • Liferay Portal 4 - Development in the Extension Environment

More information and support. If you have are looking for help in an specific issue we invite you to use our community forums: http://www.liferay.com/web/guest/devzone/forums to explain your problems and ask your questions. We also offer professional support services (support@liferay.com)where your company can be assigned a Liferay developer that will ensure that your questions are answered promptly so that your project is never compromised. Purchased support always gets first priority. This business model allows us to build a company that can contribute a great portal to the open source community. If your company uses Liferay, please consider purchasing support. Liferay has an extremely liberal license model (MIT, very similar to Apache and BSD), which means you can rebundle Liferay, rename it, and sell it under your name. We believe free means you can do whatever you want with it. Our only source of revenue is from professional support and consulting.

Chapter 1. Installation options

Liferay provides several options for installing the portal depending on your specific needs. The installation options can be grouped into three main areas:

  • Using an open source bundle: the bundles are the easiest and fastest installation method. They include an embedded database so all it takes to do the installation is to install a Java SE runtime environment, unzip the bundle and run. It is recommended for people that want to review Liferay's functionality. They can also be used for production environments if the database configuration is modified.

  • Detailed installation procedure: explains how to install the portal in an existing application server or that has just been installed using the vendor packages. This is option is available for all the supported application servers. It is recommended for production environments and when deploying to a proprietary app. server.

  • Using the ext environment: this option provides a full development environment to extend the functionality provided by Liferay. It is recommended for installation in the personal computers of the developers doing the customization. It won't be covered in this guide. Refer to the developer guides for more information about it.

Liferay is provided in two editions so it is necessary to choose the one that better fits each specific needs. The reason they exist is because some people love EJBs and some people hate them. We want to keep both happy and leverage our flexible Spring based architecture to offer both options with the same code base:

  • Liferay Portal Enterprise: uses Enterprise Java Beans (EJB) and the services provided by them. This edition can only be deployed in full JavaEE applicaton servers.

  • Liferay Portal Professional: uses servlets plus the functionalities provided by Spring and can be deployed in a servlet container.

Both editions provide the exact same functionality. The main reasons for choosing one or another will be budget limitations or performance and reliability issues. Related to the latter, to determine which edition is best for each specific case it is necessary to perform tests that will simulate the real usage and load of the system.

Chapter 2. Installing a Liferay Bundle

Liferay Portal is distributed with the following bundle options for the Professional Edition:

  • Jetty

  • Resin

  • Tomcat (JDK 1.4 edition)

  • Tomcat (JDK 5.0 edition)

The following options are offered for the Enterprise Edition:

  • Geronimo+Tomcat

  • JBoss+Jetty

  • JBoss+Tomcat

  • JOnAS+Jetty

  • JOnAS+Tomcat

Choose your preferred bundle and download it from the downloads page. Then follow the following steps described next.

1. Quick installation

Once you have downloaded the bundle you can have Liferay Portal running very quickly following these steps:

  1. Download and install JavaSE 5.0 if you haven't done so already. If you picked the Tomcat (JDK 1.4 bundle) use the JavaSE 1.4 version instead. Make sure you have defined the JAVA_HOME environment variable.

  2. Unzip the bundle to your applications directory. For example c:\apps in Windows or /usr/local/ in Linux or UNIX variants.

  3. Go to the bin directory inside the application server directory and run it using the provided script. The name of the script will depend on the application server and you'll have to use the version provided for your operating system. Names are usually pretty intuitive such as run.bat, startup.bat, jonas.bat, etc. When in a Unix environment, the batch file to start the server will end with the extension sh instead of bat. Make sure to chmod the batch file so you can execute it. You must start the executable from the directory where it resides.

  4. Once the application server has finished initialization (the first time it might take a while) open your browser and go to htp://localhost:8080. The bundle comes with an embeded HSQL database loaded with sample data from the public website of Liferay. You can try Liferay as an anonymous user by navigating your local version the public website.

  5. Login as an administrator using the following data:

    • User: test@liferay.com

    • Password: test

Congratulations! you now have a running copy of Liferay. Refer to the end user documentation for more information about how to use the administration functionalities and the bundled portlets. Refer to the developement and customization documentation to learn how to adapt Liferay to your needs.

2. Database configuration

Following the preceding instructions Liferay Portal is run using an embeded database. While this is a good method to have it up and running fast for reviewing or developing, it has several drawbacks:

  • Only one user can access it at a time. This is because the data is stored on a file on disk and HSQL locks it when doing changes.

  • The data is stored inside the application server and might be lost on redeployment.

Fortunately Liferay has a great support for a good number of production-ready databases and it is easy to configure it to use them. The exact instructions will depend on the application server and database. Refer to the appropriate subsection of section 3.2 (Databases).

3. Mail configuration

The bundled configuration tries to connect to a mail SMTP and IMAP server installed in the same machine as the application server (refered to as localhost in the configuration). This configuration can be changed following the introductions of section 3.4 (Mail Servers).

Chapter 3. Detailed installation procedure

1. Application Servers

Liferay Portal supports many different application servers and servlet containers. Liferay Portal Enterprise requires a fully compliant J2EE application server whereas Liferay Portal Professional can run in a simple servlet container.

The source code is identical in both versions. The only difference is that a property setting configures Liferay Portal Enterprise to make all calls through EJBs whereas Liferay Portal Professional makes all calls through POJOs. We offer you choices so that those who need the benefit of EJBs can have it, and those who don't want the overhead of EJBs don't have to pay for it.

We have tried to make the installation process as easy as possible by including a bundled version of Liferay with our supported open source containers. For example, if you want to try out Liferay on Jetty, simply download our bundle with precompiled JSPs, unzip it, and run it. It already comes with a built in Java database so you have to do the least amount of configuration. We also detail the steps taken to configure these containers for use with Liferay. Some instructions are separated as Easy vs. Expert.

We also plan on adding support for Geronimo, GlassFish, and JFox in as soon as possible. Please contact us if you would like to help us in this effort.

1.1. Borland ES 6.5

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install Borland ES.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Borland ES.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

  • Follow the instructions from Borland.

  • Deploy liferay-portal-ent-4.0.0.ear.

  • Open your browser to http://localhost:8080. Click on Sign In at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.2. Geronimo

This documentation has not been written yet. Please contact us if you would like to help us in this effort.

1.3. GlassFish

This documentation has not been written yet. Please contact us if you would like to help us in this effort.

1.4. JBoss+Jetty 4.0.2

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install JBoss+Jetty.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Add to /server/default/conf/jboss-service.xml:

    <classpath codebase="lib/ext" archives="*"/>
  • Download jetty-5.1.4-jboss-4.0.2.sar and unjar it to /server/default/deploy/jbossweb-jetty.sar.

    Remove /server/default/deploy/jbossweb-tomcat55.sar.

    Remove /server/default/deploy/jboss-ws4ee.sar.

    Remove /server/default/deploy/management.

  • Use the prefix deployment sorter instead of the default deployment sorter.

    Edit /server/default/conf/jboss-service.xml.

    <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>
  • Find the org.jboss.web.WebService MBean that listens on port 8083 and do not allow it send configuration files and other resources. Leaving it at the default value of true allows anyone to download your JBoss configuration files. This is a known vulnerability that will allow hackers to retrieve your database settings, etc.

    Edit /server/default/conf/jboss-service.xml.

    <attribute name="DownloadServerClasses">false</attribute>
  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by JBoss+Jetty.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Set the proper mail properties by editing /server/default/deploy/mail-service.xml.

    <mbean code="org.jboss.mail.MailService" name="jboss:service=MailSession">
        <attribute name="JNDIName">mail/MailSession</attribute>
        <attribute name="User">nobody</attribute>
        <attribute name="Password">password</attribute>
        <attribute name="Configuration">
            <configuration>
                <property name="mail.store.protocol" value="imap" />
                <property name="mail.transport.protocol" value="smtp" />
                <property name="mail.imap.host" value="localhost" />
                <property name="mail.pop3.host" value="localhost" />
                <property name="mail.smtp.host" value="localhost" />
            </configuration>
        </attribute>
    </mbean>
  • Configure JAAS.

    Edit /server/default/conf/login-config.xml and comment out the entire XML for policy other.

    <!--<application-policy name = "other">
        ...
        <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required" />
        ...
    </application-policy>-->
  • Deploy liferay-portal-ent-4.0.0.ear.

    Copy liferay-portal-ent-4.0.0.ear to /server/default/deploy.

  • Start JBoss+Jetty.

    If you get a java.lang.OutOfMemoryError exception while starting up JBoss+Jetty, give your JVM more memory by setting -Xmx512m.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.5. JBoss+Tomcat 4.0.2

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install JBoss+Tomcat.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Add to /server/default/conf/jboss-service.xml:

    <classpath codebase="lib/ext" archives="*"/>
  • Remove /server/default/deploy/jbossweb-tomcat55.sar/ROOT.war.

    Edit /server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml.

    <init-param>
        <param-name>listings</param-name>
        <param-value>false</param-value>
    </init-param>
    <init-param>
        <param-name>input</param-name>
        <param-value>4096</param-value>
    </init-param>
    <init-param>
        <param-name>output</param-name>
        <param-value>4096</param-value>
    </init-param>

    Edit /server/default/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml.

    <attribute name="Java2ClassLoadingCompliance">true</attribute>
    <attribute name="UseJBossWebLoader">true</attribute>
  • Use the prefix deployment sorter instead of the default deployment sorter.

    Edit /server/default/conf/jboss-service.xml.

    <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>
  • Find the org.jboss.web.WebService MBean that listens on port 8083 and do not allow it send configuration files and other resources. Leaving it at the default value of true allows anyone to download your JBoss configuration files. This is a known vulnerability that would allow hackers to retrieve your database settings, etc.

    Edit /server/default/conf/jboss-service.xml.

    <attribute name="DownloadServerClasses">false</attribute>
  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by JBoss+Tomcat.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Set the proper mail properties by editing /server/default/deploy/mail-service.xml.

    <mbean code="org.jboss.mail.MailService" name="jboss:service=MailSession">
        <attribute name="JNDIName">mail/MailSession</attribute>
        <attribute name="User">nobody</attribute>
        <attribute name="Password">password</attribute>
        <attribute name="Configuration">
            <configuration>
                <property name="mail.store.protocol" value="imap" />
                <property name="mail.transport.protocol" value="smtp" />
                <property name="mail.imap.host" value="localhost" />
                <property name="mail.pop3.host" value="localhost" />
                <property name="mail.smtp.host" value="localhost" />
            </configuration>
        </attribute>
    </mbean>
  • Configure JAAS.

    Edit /server/default/conf/login-config.xml and comment out the entire XML for policy other.

    <!--<application-policy name = "other">
        ...
        <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required" />
        ...
    </application-policy>-->
  • Deploy liferay-portal-ent-4.0.0.ear.

    Copy liferay-portal-ent-4.0.0.ear to /server/default/deploy.

  • Start JBoss+Tomcat.

    If you get a java.lang.OutOfMemoryError exception while starting up JBoss+Tomcat, give your JVM more memory by setting -Xmx512m.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

  • You can set up JBoss+Tomcat behind Apache using mod_jk2 by following the instructions in this document.

1.6. Jetty 5.1.4

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install Jetty.

    Get jetty-5.1.4 -all.zip because it includes all the required libraries.

  • Edit /etc/jetty.xml to configure the JettyPlus server class and add the portal web application.

    <Configure class="org.mortbay.jetty.plus.Server">
        <Call name="addWebApplication">
            <Arg>/</Arg>
            <Arg>../liferay</Arg>
            <Set name="extractWAR">true</Set>
            <Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>
            <Set name="classLoaderJava2Compliant">true</Set>
        </Call>
    </Configure>
  • Download liferay-portal-pro-4.0.0.war.

  • Populate your database with the portal schema and default data.

  • Edit /extras/etc/start-plus.config.

    $(jetty.home)/lib/ext/
    $(jetty.home)/lib/ext/*
  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Jetty.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Edit /etc/jetty.xml and configure a mail session.

    <Call name="addService">
        <Arg>
            <New class="org.mortbay.jetty.plus.MailService">
                <Set name="Name">MailService</Set>
                <Set name="JNDI">mail/MailSession</Set>
                <Put name="mail.store.protocol">imap</Put>
                <Put name="mail.transport.protocol">smtp</Put>
                <Put name="mail.imap.host">localhost</Put>
                <Put name="mail.pop3.host">localhost</Put>
                <Put name="mail.smtp.host">localhost</Put>
            </New>
        </Arg>
    </Call>
  • Configure JAAS.

    Edit /etc/jetty.xml and configure a security realm.

    <Call name="addWebApplication">
        <Arg>/</Arg>
        ...
        <Set name="Realm">
            <New class="org.mortbay.jaas.JAASUserRealm">
                <Set name="Name">PortalRealm</Set>
                <Set name="LoginModuleName">PortalRealm</Set>
            </New>
        </Set>
    </Call>

    Create /etc/jaas.config.

    PortalRealm {
        com.liferay.portal.security.jaas.PortalLoginModule required;
    };

    Make sure the Java command that starts Jetty sets the location of the JAAS config file as a system property.

    -Djava.security.auth.login.config=../etc/jaas.config
  • Deploy liferay-portal-pro-4.0.0.war.

    Unpack liferay-portal-pro-4.0.0.war to /liferay.

    Move every jar except util-taglib.jar from /liferay/WEB-INF/lib to /lib/ext. This step is only necessary if you plan to hot deploy portlet WARs.

    Edit /etc/jetty.xml to tell Jetty where to find liferay-portal-pro-4.0.0.war.

    <Call name="addWebApplication">
        <Arg>/</Arg>
        <Arg>../liferay</Arg>
        <Set name="extractWAR">true</Set>
        <Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>
        <Set name="classLoaderJava2Compliant">true</Set>
        <Set name="Realm">
            <New class="org.mortbay.jaas.JAASUserRealm">
                <Set name="Name">PortalRealm</Set>
                <Set name="LoginModuleName">PortalRealm</Set>
            </New>
        </Set>
    </Call>
  • Start Jetty.

    If you get a java.lang.OutOfMemoryError exception while starting up Jetty, give your JVM more memory by setting -Xmx512m.

    Make sure the Java command that starts Jetty sets the location of the Jetty config file as a system property.

    -DSTART=../extra/etc/start-plus.config

    Jetty also needs to know the location of its main configuration file when you start it.

    java -D... -jar ../start.jar ../etc/jetty.xml
  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.7. JFox

We plan on adding support for JFox as soon as possible. Please contact us if you would like to help us in this effort.

1.8. JOnAS+Jetty 4.4.3

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install JOnAS+Jetty.

  • Set an environment variable called $JONAS_ROOT to point to where you unzipped JOnAS+Jetty.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Open up liferay-portal-ent-4.0.0.ear and repackage cache-ejb.jar, counter-ejb.jar, documentlibrary-ejb.jar, lock-ejb.jar, mail-ejb.jar, and portal-ejb.jar to replace /META-INF/MANIFEST.MF with /META-INF/MANIFEST.MF.JOnAS. JOnAS has a bug where it hangs if different JARs in an EAR reference each other.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by JOnAS+Jetty.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Set the proper mail properties by editing /conf/mail-session.properties.

    mail.factory.name=mail/MailSession
    mail.factory.type=javax.mail.Session
    mail.store.protocol=imap
    mail.transport.protocol=smtp
    mail.imap.host=localhost
    mail.pop3.host=localhost
    mail.smtp.host=localhost

    Edit /conf/jonas.properties so it knows where to look for your mail properties.

    jonas.service.mail.factories=mail-session
  • Configure JAAS.

    Edit /conf/jaas.config.

    jetty {
        com.liferay.portal.security.jaas.PortalLoginModule required;
    };

    Open up liferay-portal-ent-4.0.0.ear and repackage portal-web-complete.war and tunnel-web.war to replace /WEB-INF/web-jetty.xml with /WEB-INF/web-jetty.xml.JOnAS_Jetty.

  • Deploy liferay-portal-ent-4.0.0.ear.

    Copy liferay-portal-ent-4.0.0.ear to /apps.

    Edit /conf/jonas.properties and configure the application name.

    jonas.service.ear.descriptors=liferay-portal-ent-4.0.0.ear

    Remove /webapps/autoload/ctxroot.war.

  • Start JOnAS+Jetty.

    If you get a java.lang.OutOfMemoryError exception while starting up JOnAS+Jetty, give your JVM more memory by setting -Xmx512m.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test

1.9. JOnAS+Tomcat 4.4.3

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install JOnAS+Tomcat.

  • Set an environment variable called $JONAS_ROOT to point to where you unzipped JOnAS+Tomcat.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Open up liferay-portal-ent-4.0.0.ear and repackage cache-ejb.jar, counter-ejb.jar, documentlibrary-ejb.jar, lock-ejb.jar, mail-ejb.jar, and portal-ejb.jar to replace /META-INF/MANIFEST.MF with /META-INF/MANIFEST.MF.JOnAS. JOnAS has a bug where it hangs if different JARs in an EAR reference each other.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by JOnAS+Tomcat.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Set the proper mail properties by editing /conf/mail-session.properties.

    mail.factory.name=mail/MailSession
    mail.factory.type=javax.mail.Session
    mail.store.protocol=imap
    mail.transport.protocol=smtp
    mail.imap.host=localhost
    mail.pop3.host=localhost
    mail.smtp.host=localhost

    Edit /conf/jonas.properties so it knows where to look for your mail properties.

    jonas.service.mail.factories=mail-session
  • Configure JAAS.

    Edit /conf/jaas.config.

    tomcat {
        com.liferay.portal.security.jaas.PortalLoginModule required;
    };

    Edit /conf/server.xml to use the correct realm.

    <Realm className="org.objectweb.jonas.security.realm.web.catalina50.JAAS" />
  • Deploy liferay-portal-ent-4.0.0.ear.

    Copy liferay-portal-ent-4.0.0.ear to /apps.

    Edit /conf/jonas.properties and configure the application name.

    jonas.service.ear.descriptors=liferay-portal-ent-4.0.0.ear

    Remove /webapps/autoload/ctxroot.war.

  • Start JOnAS+Tomcat.

    If you get a java.lang.OutOfMemoryError exception while starting up JOnAS+Tomcat, give your JVM more memory by setting -Xmx512m.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.10. JRun 4 Updater 3

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install JRun.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • The dependent libraries are found in /lib inside liferay-portal-ent-4.0.0.ear. Delete the dependent libraries from liferay-portal-ent-4.0.0.ear after you copy them to /servers/lib. JRun has a bug where it cannot properly compile JSPs with Jikes in a Windows environment because the Windows command prompt has a size limitation. JRun also does not give a correct error message but gives a misleading error message stating that JRun cannot find Jikes.

  • Remove /servers/default/default-ear.

  • Start JRun.

    If you get a java.lang.OutOfMemoryError exception while starting up JRun, give your JVM more memory by setting -Xmx512m.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by JRun.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    [Note]Note

    Configuring mail sessions may not be necessary if you're using JRun Updater 3. The screen for updating mail sessions seems to be missing from JRun Updater 3 and only available in previous versions.

  • Configure JAAS.

    Use jrun.security.JDBCLoginModule as your user module class. Point the user module to use jdbc/LiferayPool as the data source. Under user details, set the table name to User_, set the user name to userId, and set the password to password_.

    Use jrun.security.JDBCLoginModule as your role module class. Point the role module to use jdbc/LiferayPool as the data source. Under user query, set the query string to SELECT 'users', 'Roles', COUNT(*) FROM Role_ WHERE roleId NOT LIKE ?.

    The following are links to pages with instructions on how to configure security with JRun.

    http://livedocs.macromedia.com/jrun4docs/JRun_Administrators_Guide/authentic4.jsp

    http://www.macromedia.com/devnet/server_archive/articles/jrun_authentication.html

  • Deploy liferay-portal-ent-4.0.0.ear.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.11. OracleAS 10.1.2

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install OracleAS.

  • The following are links to pages with instructions on how to configure OracleAS to support JDK 1.4.2 .

    http://otn.oracle.com/tech/java/oc4j/htdocs/OC4J-JSP-FAQ.html

    http://www.rollerweblogger.org/page/roller/20021017

  • OracleAS incorrectly detects duplicate page directives. To workaround this bug, set forgive_dup_dir_attr to true.

    http://technet.oracle.com/tech/java/oc4j/htdocs/OC4J-JSP-FAQ.html#Attribute%20defined%20twice

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by OracleAS.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Edit orion-application.xml, found in liferay-portal-ent-4.0.0.ear and configure a mail session.

    <mail-session location="mail/MailSession" smtp-host="localhost">
        <property name="mail.transport.protocol" value="smtp" />
        <property name="mail.imap.host" value="localhost" />
        <property name="mail.pop3.host" value="localhost" />
    </mail-session>
  • Configure JAAS.

    Edit orion-application.xml, found in liferay-portal-ent-4.0.0.ear, and configure a user manager.

    <user-manager class="com.evermind.sql.DataSourceUserManager">
        <property name="dataSource" value="jdbc/LiferayPool" />
        <property name="table" value="User_" />
        <property name="usernameField" value="userId" />
        <property name="passwordField" value="password_" />
        <property name="defaultGroups" value="users" />
        <property name="staleness" value="0" />
    </user-manager>
  • Deploy liferay-portal-ent-4.0.0.ear.

    Copy liferay-portal-ent-4.0.0.ear to /j2ee/home/applications.

    Edit /j2ee/home/config/server.xml to tell OracleAS where to find liferay-portal-ent-4.0.0.ear.

    <application name="liferay" path="../applications/liferay-portal-ent-4.0.0.ear" />

    Edit /j2ee/home/config/server.xml and add a new web site entry.

    <web-site path="./web-sites/liferay.com-web.xml" />

    Create /j2ee/home/config/web-sites/liferay.com-web.xml.

    <web-site port="8080">
        <default-web-app application="liferay" name="portal-web-complete" load-on-startup="true" />
        <web-app application="liferay" name="tunnel-web" root="/tunnel" load-on-startup="true" />
        <access-log path="../../log/liferay.com-web-access.log" />
    </web-site>

    Make sure to set load-on-startup to true. OracleAS has a bug that will not allow the servlet init method to call secured EJBs unless that init method is called during startup.

  • Start OracleAS.

    If you get a java.lang.OutOfMemoryError exception while starting up OracleAS, give your JVM more memory by setting -Xmx512m.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.12. Orion 2.0.6

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install Orion.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Orion.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Edit orion-application.xml, found in liferay-portal-ent-4.0.0.ear and configure a mail session.

    <mail-session location="mail/MailSession" smtp-host="localhost">
        <property name="mail.transport.protocol" value="smtp" />
        <property name="mail.imap.host" value="localhost" />
        <property name="mail.pop3.host" value="localhost" />
    </mail-session>
  • Configure JAAS.

    Edit orion-application.xml, found in liferay-portal-ent-4.0.0.ear, and configure a user manager.

    <user-manager class="com.evermind.sql.DataSourceUserManager">
        <property name="dataSource" value="jdbc/LiferayPool" />
        <property name="table" value="User_" />
        <property name="usernameField" value="userId" />
        <property name="passwordField" value="password_" />
        <property name="defaultGroups" value="users" />
        <property name="staleness" value="0" />
    </user-manager>
  • Deploy liferay-portal-ent-4.0.0.ear.

    Copy liferay-portal-ent-4.0.0.ear to /applications.

    Edit /config/server.xml to tell Orion where to find liferay-portal-ent-4.0.0.ear.

    <application name="liferay" path="../applications/liferay-portal-ent-4.0.0.ear" />

    Edit /config/server.xml and add a new web site entry.

    <web-site path="./web-sites/liferay.com-web.xml" />

    Create /config/web-sites/liferay.com-web.xml.

    <web-site port="8080">
        <default-web-app application="liferay" name="portal-web-complete" load-on-startup="true" />
        <web-app application="liferay" name="tunnel-web" root="/tunnel" load-on-startup="true" />
        <access-log path="../../log/liferay.com-web-access.log" />
    </web-site>

    Make sure to set load-on-startup to true.

  • Start Orion.

    If you get a java.lang.OutOfMemoryError exception while starting up Orion, give your JVM more memory by setting -Xmx512m.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.13. Pramati 4.1

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install Pramati.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Edit /server/bin/setup.bat. Add the following snippet right after Pramati declares the CLASSPATH. Download lcp.bat. This script will load everything in /server/lib/ext into the class path.

    set LOCALCLASSPATH=
    for %%i in ("lib\*.jar") do call "lcp.bat" %%i
    set CLASSPATH=%CLASSPATH%;%LOCALCLASSPATH%
  • Start Pramati.

    If you get a java.lang.OutOfMemoryError exception while starting up Pramati, give your JVM more memory by setting -Xmx512m.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Pramati.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

  • Deploy liferay-portal-ent-4.0.0.ear.

    We recommend that you use the Deploy Tool instead of the Admin Console because the Deploy Tool is a lot more stable for large EARs. Follow the instructions from Pramati for more information.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.14. Resin 3.0.14

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install Resin.

  • Edit /conf/resin.conf to set up the correct SAX parsers.

    <system-property
        javax.xml.parsers.DocumentBuilderFactory=
            "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"
    />
    <system-property
        javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"
    />
    <system-property
        javax.xml.transform.TransformerFactory=
            "org.apache.xalan.processor.TransformerFactoryImpl"
    />
    <system-property
        org.xml.sax.driver="org.apache.xerces.parsers.SAXParser"
    />

    Download liferay-portal-ent-4.0.0-src.zip.

    Open up liferay-portal-ent-4.0.0-src.zip and copy /portal/lib/saxpath.jar, /portal/lib/xalan.jar/, and /portal/lib/xercesImpl.jar to /lib so that Resin has the proper libraries for SAX parsing.

  • Download liferay-portal-pro-4.0.0.war.

  • Populate your database with the portal schema and default data.

  • Edit /conf/resin.conf.

    <compiling-loader path="${server.rootDir}/common/classes"/>
    <library-loader path="${server.rootDir}/common/lib"/>
  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Resin.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Edit /conf/resin.conf and configure a mail session.

    <resource jndi-name="mail/MailSession" type="javax.mail.Session">
        <init>
            <mail.store.protocol>imap</mail.store.protocol>
            <mail.transport.protocol>smtp</mail.transport.protocol>
            <mail.imap.host>localhost</mail.imap.host>
            <mail.pop3.host>localhost</mail.pop3.host>
            <mail.smtp.host>localhost</mail.smtp.host>
        </init>
    </resource>
  • Deploy liferay-portal-pro-4.0.0.war.

    Unpack liferay-portal-pro-4.0.0.war to %CATALINA_HOME%/liferay.

    Move every jar except util-taglib.jar from %CATALINA_HOME%/liferay/WEB-INF/lib to /common/lib/ext. This step is only necessary if you plan to hot deploy portlet WARs.

  • Start Resin.

    If you get a java.lang.OutOfMemoryError exception while starting up Resin, give your JVM more memory by setting -Xmx512m.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.15. RexIP 2.5

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install RexIP.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Copy the dependent libraries to /lib. The dependent libraries are found in a /lib inside liferay-portal-ent-4.0.0.ear. ReXIP has a bug which prevents it from picking up the dependent libraries declared in MANIFEST.MF.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by RexIP.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Edit /server.xml and configure a mail session.

    <mail jndi-name="mail/MailSession" name="mail">
        <properties name="mail.smtp.host" value="localhost"></properties>
    </mail>
  • Configure JAAS.

    Edit server.xml and configure a security realm.

    <security default-basic-realm="PortalRealm">
        <basic-realm
            check-login-query="SELECT * FROM User_ WHERE userId = ? AND password_ = ?"
            datasource-name="LiferayPool"
            get-user-query=""
            get-group-query=""
            name="PortalRealm"
            realm-type="jdbc"
            user-role-query="">
        </basic-realm>
    </security>
  • Deploy liferay-portal-ent-4.0.0.ear.

    Edit /server.xml to tell RexIP where to find the unarchived application.

    <app name="liferayApp" path="liferay/">
        <server name="liferayServer"></server>
    </app>
  • Start RexIP.

    If you get a java.lang.OutOfMemoryError exception while starting up RexIP, give your JVM more memory by setting -Xmx512m.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.16. Sun JSAS 8.01

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install Sun JSAS.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Edit /AppServer/domains/domain1/server1/config/server.policy.

    Change permission java.io.FilePermission "<>", "read,write"; to permission java.io.FilePermission "<>", "read,write,execute,delete";

    Change permission java.util.PropertyPermission "*", "read"; to permission java.util.PropertyPermission "*", "read,write";

    Add permission java.lang.RuntimePermission "*";

    Add permission java.lang.reflect.ReflectPermission "suppressAccessChecks";

    Add permission java.security.SecurityPermission "insertProvider.*";

    Add permission javax.security.auth.AuthPermission "getLoginConfiguration";

    Add permission javax.security.auth.AuthPermission "setLoginConfiguration";

    Refer to Sun's documentation for more information.

  • Start Sun JSAS.

    If you get a java.lang.OutOfMemoryError exception while starting up Sun JSAS, give your JVM more memory by setting -Xmx512m.

    Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Sun JSAS.

    Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Configure JAAS.

    Create a new security realm called PortalRealm with class name com.liferay.portal.security.jaas.ext.sun8.PortalRealm. Use the class name com.liferay.portal.security.jaas.ext.sun7.PortalRealm if you are using the older Sun ONE 7.

    Edit properties for PortalRealm. Add the property jaas-context with the value PortalRealm.

    Download liferay-portal-ent-4.0.0-jaas.jar.

    Edit the server instance's JVM Settings. Under path settings, add /AppServer/lib/liferay-portal-ent-4.0.0-jaas.jar to the classpath suffix.

    Edit /AppServer/domains/domain1/server1/config/login.conf.

    PortalRealm {
        com.liferay.portal.security.jaas.ext.sun8.PortalLoginModule required;
    };

    Use com.liferay.portal.security.jaas.ext.sun7.PortalLoginModule if you are using the older Sun ONE 7.

    Restart Sun JSAS.

  • Deploy liferay-portal-ent-4.0.0.ear.

    Restart Sun JSAS because there is a conflict with the default web application that is also listening on /.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.17. Tomcat 5.0.x/5.5.x

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

    If you are using Tomcat 5.5.x, you must download and install JDK 5.

  • Download and install Tomcat.

    You can download Tomcat 5.0.x or Tomcat 5.5.x. This documentation assumes that you are using Tomcat 5.0.x but will also give special instructions for usage with Tomcat 5.5.x.

  • Create /conf/Catalina/localhost/liferay.xml to set up the portal web application.

    <Context
        path=""
        docBase="../liferay"
        debug="0"
        reloadable="true"
        crossContext="true">
    </Context>

    For Tomcat 5.5.x, edit /conf/Catalina/localhost/ROOT.xml. You must also remove the reference to path="" in the XML.

  • Download liferay-portal-pro-4.0.0.war.

  • Populate your database with the portal schema and default data.

  • Edit /conf/catalina.properties.

    common.loader=
        ${catalina.home}/common/classes,\
        ...\
        ${catalina.home}/common/lib/ext/*.jar
  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Tomcat.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

    Edit /conf/Catalina/localhost/liferay.xml and configure a mail session. For Tomcat 5.5.x, edit /conf/Catalina/localhost/ROOT.xml.

    <Context...>
        <Resource
            name="mail/MailSession"
            auth="Container"
            type="javax.mail.Session"
        />
        <ResourceParams name="mail/MailSession">
            <parameter>
                <name>mail.store.protocol</name>
                <value>imap</value>
            </parameter>
            <parameter>
                <name>mail.transport.protocol</name>
                <value>smtp</value>
            </parameter>
            <parameter>
                <name>mail.imap.host</name>
                <value>localhost</value>
            </parameter>
            <parameter>
                <name>mail.pop3.host</name>
                <value>localhost</value>
            </parameter>
            <parameter>
                <name>mail.smtp.host</name>
                <value>localhost</value>
            </parameter>
        </ResourceParams>
    </Context>
  • Configure JAAS.

    Edit /conf/Catalina/localhost/liferay.xml and configure a security realm. For Tomcat 5.5.x, edit /conf/Catalina/localhost/ROOT.xml.

    <Context...>
        <Realm
            className="org.apache.catalina.realm.JAASRealm"
            appName="PortalRealm"
            userClassNames="com.liferay.portal.security.jaas.PortalPrincipal"
            roleClassNames="com.liferay.portal.security.jaas.PortalRole"
            debug="99"
            useContextClassLoader="false"
        />
    </Context>

    Repeat this step for a file called /conf/Catalina/localhost/tunnel.xml if you want to enable Liferay's HTTP tunneling.

    Create /conf/jaas.config.

    PortalRealm {
        com.liferay.portal.security.jaas.PortalLoginModule required;};

    Edit /bin/catalina.bat so that Tomcat can reference the login module.

    ...
    
    rem ----- Execute...
    
    set JAVA_OPTS=%JAVA_OPTS% 
    -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config
  • Deploy liferay-portal-pro-4.0.0.war.

    Unpack liferay-portal-pro-4.0.0.war to %CATALINA_HOME%/liferay.

    Move every jar except util-taglib.jar from %CATALINA_HOME%/liferay/WEB-INF/lib to /common/lib/ext. This step is only necessary if you plan to hot deploy portlet WARs.

  • Start Tomcat.

    If you get a java.lang.OutOfMemoryError exception while starting up Tomcat, give your JVM more memory by setting -Xmx512m.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.18. WebLogic 8.1 SP4

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install WebLogic.

  • Download liferay-portal-ent-4.0.0.ear.

  • Populate your database with the portal schema and default data.

  • Edit /user_projects/domains/mydomain/startWebLogic.cmd. Add the following snippet right after WebLogic declares the CLASSPATH. Download lcp.bat. This script will load everything in /user_projects/domains/mydomain/lib into the class path.

    set LOCALCLASSPATH=
    for %%i in ("lib\*.jar") do call "lcp.bat" %%i
    set CLASSPATH=%CLASSPATH%;%LOCALCLASSPATH%
    
    set MEM_ARGS=-Xmx512m

    For WebLogic 8.1 SP3, follow the additional instructions from this post.

  • Start WebLogic.

    If you get a java.lang.OutOfMemoryError exception while starting up WebLogic, give your JVM more memory by setting -Xmx512m.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by WebLogic.

  • Create a mail session bound to mail/MailSession. You only need to set the locations of the IMAP, POP3, and SMTP servers.

  • Deploy liferay-portal-ent-4.0.0.ear.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

1.19. WebSphere 6.0.2.5

Define Environment

  • Copy the following under <WAS_HOME>/lib/ext directory.

    • Commons-dbcp.jar

    • Commons-pool.jar

    • System-ext.properties

    • portal-ext.properties

    • Your custom authentication class or the Liferay provided custom authentication class (provided in com.liferay.portal.security.jaas.ext.websphere.PortalUserRegistry.class in liferay-portal-jaas-4.0.0rc2).

    • The JDBC driver used by your custom authentication class, or liferay-jdbc-4.x.jar, if the custom authentication uses the Liferay driver.

  • Unzip all the libraries except util-tag.jar from the liferay-portal-4x.war into a new directory (i.e. c:\Liferay\lib).

  • Login to the Websphere Admin Console, under Environment, Shared Libraries, ensure “Node” is selected under “Scope”, select Apply.

  • Click “New” under “Preferences”.

  • Enter a Name (i.e. “LiferayLibs”) and Description. Under “ClassPath”, enter the directory created in Step 2 above (i.e. c:\Liferay\lib”). Click “OK” and “Save” at the top of the page to save your changes.

  • Under “Servers”, “Application Servers”, select the application server you’re using (i.e. “server1”).

  • Under “Server Infrastructure”, select “Class Loader” under “Java and Process Management”. Click “New”, select “Parent Last” under “Class Loader mode”, click “OK”.

  • Under the Class Loader section, you should see the new class loader as “Classloader_12345678”, select this classloader, under “Additional Properties”, select “Add”, and under “Library Name”, you should select the classloader created above (i.e. “LibrayLibs”). Click “OK” and “Save” at the top of the page.

  • Restart Websphere.

Define Data Connection

  • Login to the Websphere Admin Console

  • Under Resources, select JDBC Providers. Be sure “Node” is selected under “Scope”. Click New.

  • Under General Properties, Step 1, select “User-Defined” Under General Properties, Step 2, select “User-Defined JDBC Provider” Under General Properties, Step 3, select “User-defined”.

  • Click Next.

  • Enter in the Name field “Liferay JDBC Provider” (or some other descriptive name)

  • Remove any text from the “Class Path” field.

  • Click OK, and then “Save” at the top of the page to save your changes before continuing.

  • After saving, select the JDBC Provider you just created, click “Data Sources”, and click “New”

  • Under General Properties, enter “Liferay” in the “Name” field and “jdbc/LiferayPool” in the “JNDI name” field. Under “Data store helper class name”, leave the default “Generic data store helper” selected. The remaining values (“Authentication Alias”, and “Container-managed Authentication” are not used and should default to “none”)

  • Click “OK” and then “Save” at the top of the page to save your changes before continuing.

  • Select the “Data Source” you just created (“Liferay”), click “Custom Properties” and add the following, per your database of choice:

    • url

    • password

    • user

    • password

  • Save changes.

  • Test the connection by selecting under Resources, “JDBC Providers”, “Liferay JDBC Providers” (or whatever you named in step 9 above), and then click “Test Connection”.

Setup Security

  • Create your custom login class by creating your own class or using the provided Liferay login class for Websphere (provided in com.liferay.portal.security.jaas.ext.websphere.PortalUserRegistry.class in liferay-portal-jaas-4.0.0rc2)

  • In the WebSphere Admin Console, select “Global Security” under the “Security” section. Under “Configuration”, click “Custom” under “User Registries”.

  • Enter the custom login class you created or “com.liferay.portal.security.jaas.ext.websphere.PortalUserRegistry” in the “Custom User Registry Class Name” field.

  • You may also enter values in the “Server User Id” and “Server User Password” field if you want to use these values when you login to the Admin Console.

  • Under “Global Security”, select “Enable global security”, de-select “Enforce Java 2 Security”, and under “Active user registry”, select “Custom user registry”.

  • Click OK, and then “Save” at the top of the page to save your changes before continuing.

  • If you encounter any errors (class not found, etc), you will see them here when you attempt to save.

  • Restart WebSphere and login using the name provided in Step 29 above or using the appropriate database id/password as coded in your custom login class.

Install Liferay

  • Login to the Websphere Admin Console

  • Ensure the “Default Application” is either removed or not running under “Enterprise Applications”.

  • Click “Install New Application”.

  • Select the desired Liferay WAR file (i.e. liferay-portal-4x.war) using Local or Remote file system.

  • Enter “/” as the Context root, click “Next”.

  • Do not change any values on the next page, click “Next”.

  • The next page will show “Application Security Warnings”, click “Continue”.

  • Enter a valid “Directory to install the application” (i.e. c:\Apps\Liferay”). Under “Application Name”, shorten the name to “Liferay4”, or something similar. Leave all other fields to their default values. Click “Next”.

  • Under “Map Modules to Servers”, select the Cells/Webserver targets for your environment, normally you would select all the items in “Clusters and Servers”, click the checkbox under “Select”, then click “Apply”.

  • Enter “mail/MailSession” in the “JNDI Name” under “javax.mail.session” section.

  • Under the page “Map Resource Reference to Resources”, under “javax.sql.DataSource”, select the checkbox at the bottom of the page under “Select”. Then, under “Specify existing Resource JNDI name”, select “jdbc/LiferayPool”, click the “Apply” button next to this drop-down.

  • Select “Next” at the bottom of the page.

  • Under “Application Resource Warnings”, click “Continue”.

  • Under “Map virtual hosts for Web Modules”, click “Next”.

  • Under “Map security roles to users/groups”, across from “users” select the checkbox under “All authenticated”.

  • Under the “Summary”, click “Finish”.

  • If the application install completed without any errors, click “Save to Master Configuration”.

  • Under “Applications”, select the LiferayEAR, under “Class Loading and File Update Detection, change “Class loader mode” to “Parent Last”

  • Under “Applications”, select the LiferayEAR application by selecting the check box, then select “Start”.

1.20. WebSphere 5.1

  • Download and install JDK 1.4.2 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.

  • Download and install WebSphere.

  • Download liferay-portal-pro-4.0.0.war.

  • Populate your database with the portal schema and default data.

  • WebSphere does not have access to com.sun.crypto.provider.SunJCE and requires com.ibm.crypto.provider.IBMJCE for the programmatic encryption calls made by the portal.

    Create system-ext.properties in /AppServer/lib/ext and set com.liferay.util.Encryptor.provider.class with the value com.ibm.crypto.provider.IBMJCE.

    This step is not required because Liferay is smart enough to use IBMJCE instead of SunJCE when in WebSphere, but will issue a warning in the log files.

  • Start WebSphere.

    If you get a java.lang.OutOfMemoryError exception while starting up WebSphere, give your JVM more memory by setting -Xmx512m.

  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by WebSphere.

  • Configure JAAS.

    Download liferay-portal-ent-4.0.0-jaas.jar into /AppServer/lib/ext.

    Use the Administrative Console to add a custom user registry: Security -> User Registries -> Custom. Set system as the server user id, password as the server user password, and com.liferay.portal.security.jaas.ext.websphere.PortalUserRegistry as the custom registry class name.

    WebSphere is now configured to check security from the jdbc/LiferayPool which points to the Liferay tables. Add a corresponding user to the User_ table.

    insert into User_ (companyId, userId, password_) values ('system', 'system', 'password');

    Edit your Stop the Server shortcut to set the user id and password. If you don't do this, you will not be able to stop the server after your restart WebSphere.

    "C:\Program Files\WebSphere\AppServer\bin\stopServer.bat" server1 -user system -password password

    Go to Security -> Global Security. Check Enabled. Uncheck Enforce Java 2 Security.

    Set the Active User Registry to Custom.

    Restart WebSphere.

  • Deploy liferay-portal-pro-4.0.0.war.

    Open up liferay-portal-pro-4.0.0.war and move every jar except util-taglib.jar from liferay-portal-pro-4.0.0.war to /Anywhere/lib.

    Use the Administrative Console: Applications -> Enterprise Applications -> adminconsole and set the Classloader Mode to PARENT_LAST.

    Go to Environment -> Shared Libraries and create a new library with the name Liferay Libraries and a classpath that points to /Anywhere/lib.

    Go to Servers -> Application Servers -> server1 -> Classloader and create a new classloader with the Libraries set at Liferay Libraries and the Classloader Mode set at PARENT_FIRST.

    Go to Applications -> Enterprise Applications to stop and uninstall the default application because it is also listening on /.

    Go to Applications -> Install New Application. Upload liferay-portal-pro-4.0.0.war and set the context root to /. Click Next.

    Check Generate Default Bindings, then click Next.

    Click Continue.

    Click Next for Step 1.

    Set mail/MailSession as the mail session and jdbc/LiferayPool as the data source, then click Next for Step 2.

    Click Next for Step 3.

    Click Next for Step 4.

    Check All Authenticated?, then click Next for Step 5.

    Click Finish for Step 6.

    Restart WebSphere.

  • Open your browser to http://localhost:8080. Click on My Liferay at the upper right hand corner to enter the login screen. Your login is test@liferay.com and your password is test.

2. Databases

Liferay Portal Enterprise was designed to be database agnostic. To make this possible, all business logic had to be concentrated in the middle tier with the database being as dumb as possible. This means the portal does not rely on any database specific stored procedures or on the database to generate unique keys.

To generate scripts that create and populate the database, go to /portal-ejb and run the ant command: ant build-db. This command will generate the scripts for DB2, Firebird, Hypersonic, Interbase, JDataStore, MySQL, Oracle, PostgreSQL, and SQL Server.

The generated scripts reside in /sql/portal and are named: portal-db2.sql, portal-firebird.sql, portal-hypersonic.sql, portal-interbase.sql, portal-jdatastore.sql, portal-mysql.sql, portal-oracle.sql, portal-postgresql.sql, and portal-sql-server.sql.

2.1. DB2

Create a database in DB2 called lportal. Use Command Center to load the script named portal-db2.sql.

BES with DB2

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>db2</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>com.liferay.jdbc.LiferayDriver</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:db2://localhost:50000/lportal</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with DB2

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:db2://localhost:50000/lportal
     </connection-url>
     <driver-class>com.liferay.jdbc.LiferayDriver</driver-class>
     <user-name>test</user-name>
     <password>test</password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with DB2

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">com.liferay.jdbc.LiferayDriver</Set>
                        <Set name="Url">jdbc:db2://localhost:50000/lportal</Set>
                        <Set name="User">test</Set>
                        <Set name="Password">test</Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with DB2

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:db2://localhost:50000/lportal
datasource.classname=com.liferay.jdbc.LiferayDriver
datasource.username=test
datasource.password=test
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with DB2

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:db2://localhost:50000/lportal as the URL, com.liferay.jdbc.LiferayDriver as the driver, test as the user name, and test as the password.

OracleAS with DB2

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.liferay.jdbc.LiferayDriver"
    url="jdbc:db2://localhost:50000/lportal"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with DB2

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.liferay.jdbc.LiferayDriver"
    url="jdbc:db2://localhost:50000/lportal"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with DB2

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:db2://localhost:50000/lportal as the URL, com.liferay.jdbc.LiferayDriver as the driver, test as the user name, and test as the password.

Resin with DB2

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="com.liferay.jdbc.LiferayDriver">
        <url>jdbc:db2://localhost:50000/lportal</url>
        <user>test</user>
        <password>test</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with DB2

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="com.liferay.jdbc.LiferayDriver"
    url="jdbc:db2://localhost:50000/lportal"
    username="test"
    password="test"
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with DB2

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=com.liferay.jdbc.LiferayDriver, url=jdbc:db2://localhost:50000/lportal, username=test, and password=test.

Create a data source bound to jdbc/LiferayPool.

Tomcat with DB2

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>com.liferay.jdbc.LiferayDriver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:db2://localhost:50000/lportal</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="com.liferay.jdbc.LiferayDriver"
        url="jdbc:db2://localhost:50000/lportal"
        username="test"
        password="test"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with DB2

Use the Administration Console to do the following:

Create a connection pool using jdbc:db2://localhost:50000/lportal as the URL, com.liferay.jdbc.LiferayDriver as the driver, test as the user name, and test as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with DB2

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=com.liferay.jdbc.LiferayDriver, url=jdbc:db2://localhost:50000/lportal, user=test, and password=test.

2.2. Firebird

Create a database in InterBase located at /opt/data/lportal.gdb. At your UNIX shell or DOS prompt, type isql -U sysdba -P masterkey -d /opt/data/lportal.gdb -i portal-interbase.sql.

BES with Firebird

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>firebird</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>org.firebirdsql.jdbc.FBDriver</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:firebirdsql://localhost/opt/data/lportal.gdb</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value>sysdba</prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value>masterkey</prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with Firebird

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:firebirdsql://localhost/opt/data/lportal.gdb
     </connection-url>
     <driver-class>org.firebirdsql.jdbc.FBDriver</driver-class>
     <user-name>sysdba</user-name>
     <password>masterkey</password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with Firebird

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">org.firebirdsql.jdbc.FBDriver</Set>
                        <Set name="Url">jdbc:firebirdsql://localhost/opt/data/lportal.gdb</Set>
                        <Set name="User">sysdba</Set>
                        <Set name="Password">masterkey</Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with Firebird

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:firebirdsql://localhost/opt/data/lportal.gdb
datasource.classname=org.firebirdsql.jdbc.FBDriver
datasource.username=sysdba
datasource.password=masterkey
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with Firebird

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:firebirdsql://localhost/opt/data/lportal.gdb as the URL, org.firebirdsql.jdbc.FBDriver as the driver, sysdba as the user name, and masterkey as the password.

OracleAS with Firebird

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="org.firebirdsql.jdbc.FBDriver"
    url="jdbc:firebirdsql://localhost/opt/data/lportal.gdb"
    username="sysdba"
    password="masterkey"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with Firebird

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="org.firebirdsql.jdbc.FBDriver"
    url="jdbc:firebirdsql://localhost/opt/data/lportal.gdb"
    username="sysdba"
    password="masterkey"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't already another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with Firebird

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:firebirdsql://localhost/opt/data/lportal.gdb as the URL, org.firebirdsql.jdbc.FBDriver as the driver, sysdba as the user name, and masterkey as the password.

Resin with Firebird

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="org.firebirdsql.jdbc.FBDriver">
        <url>jdbc:firebirdsql://localhost/opt/data/lportal.gdb</url>
        <user>sysdba</user>
        <password>masterkey</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with Firebird

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="org.firebirdsql.jdbc.FBDriver"
    url="jdbc:firebirdsql://localhost/opt/data/lportal.gdb"
    username="sysdba"
    password="masterkey"
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't already another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with Firebird

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=org.firebirdsql.jdbc.FBDriver, url=jdbc:firebirdsql://localhost/opt/data/lportal.gdb, username=sysdba, and password=masterkey.

Create a data source bound to jdbc/LiferayPool.

Tomcat with Firebird

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>org.firebirdsql.jdbc.FBDriver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:firebirdsql://localhost/opt/data/lportal.gdb</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>sysdba</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>masterkey</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="org.firebirdsql.jdbc.FBDriver"
        url="jdbc:firebirdsql://localhost/opt/data/lportal.gdb"
        username="sysdba"
        password="masterkey"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with Firebird

Use the Administration Console to do the following:

Create a connection pool using jdbc:firebirdsql://localhost/opt/data/lportal.gdb as the URL, org.firebirdsql.jdbc.FBDriver as the driver, sysdba as the user name, and masterkey as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with Firebird

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=org.firebirdsql.jdbc.FBDriver, url=jdbc:firebirdsql://localhost/opt/data/lportal.gdb, user=sysdba, and password=masterkey.

2.3. Hypersonic

Run the Hypersonic Database Manager and log into the database instance. Cut and paste the contents of portal-hypersonic.sql into the manager and excecute the SQL statements.

BES with Hypersonic

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>hypersonic</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>org.hsqldb.jdbcDriver</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:hsqldb:hsql://localhost</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value></prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value></prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with Hypersonic

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:hsqldb:hsql://localhost
     </connection-url>
     <driver-class>org.hsqldb.jdbcDriver</driver-class>
     <user-name></user-name>
     <password></password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with Hypersonic

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">org.hsqldb.jdbcDriver</Set>
                        <Set name="Url">jdbc:hsqldb:hsql://localhost</Set>
                        <Set name="User"></Set>
                        <Set name="Password"></Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with Hypersonic

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:hsqldb:hsql://localhost
datasource.classname=org.hsqldb.jdbcDriver
datasource.username=
datasource.password=
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with Hypersonic

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:hsqldb:hsql://localhost as the URL, org.hsqldb.jdbcDriver as the driver, as the user name, and as the password.

OracleAS with Hypersonic

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="org.hsqldb.jdbcDriver"
    url="jdbc:hsqldb:hsql://localhost"
    username=""
    password=""
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with Hypersonic

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="org.hsqldb.jdbcDriver"
    url="jdbc:hsqldb:hsql://localhost"
    username=""
    password=""
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with Hypersonic

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:hsqldb:hsql://localhost as the URL, org.hsqldb.jdbcDriver as the driver, as the user name, and as the password.

Resin with Hypersonic

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="org.hsqldb.jdbcDriver">
        <url>jdbc:hsqldb:hsql://localhost</url>
        <user></user>
        <password></password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with Hypersonic

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="org.hsqldb.jdbcDriver"
    url="jdbc:hsqldb:hsql://localhost"
    username=""
    password=""
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't already another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with Hypersonic

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=org.hsqldb.jdbcDriver, url=jdbc:hsqldb:hsql://localhost, username=, and password=.

Create a data source bound to jdbc/LiferayPool.

Tomcat with Hypersonic

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>org.hsqldb.jdbcDriver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:hsqldb:hsql://localhost</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value></value>
        </parameter>
        <parameter>
            <name>password</name>
            <value></value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="org.hsqldb.jdbcDriver"
        url="jdbc:hsqldb:hsql://localhost"
        username=""
        password=""
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with Hypersonic

Use the Administration Console to do the following:

Create a connection pool using jdbc:hsqldb:hsql://localhost as the URL, org.hsqldb.jdbcDriver as the driver, as the user name, and as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with Hypersonic

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=org.hsqldb.jdbcDriver, url=jdbc:hsqldb:hsql://localhost, user=, and password=.

2.4. InterBase

Create a database in InterBase located at /opt/data/lportal.gdb. At your UNIX shell or DOS prompt, type isql -U sysdba -P masterkey -d /opt/data/lportal.gdb -i portal-firebird.sql.

BES with InterBase

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>interbase</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>interbase.interclient.Driver</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:interbase://localhost/opt/data/lportal.gdb</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value>sysdba</prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value>masterkey</prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with InterBase

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:interbase://localhost/opt/data/lportal.gdb
     </connection-url>
     <driver-class>interbase.interclient.Driver</driver-class>
     <user-name>sysdba</user-name>
     <password>masterkey</password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with InterBase

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">interbase.interclient.Driver</Set>
                        <Set name="Url">jdbc:interbase://localhost/opt/data/lportal.gdb</Set>
                        <Set name="User">sysdba</Set>
                        <Set name="Password">masterkey</Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with InterBase

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:interbase://localhost/opt/data/lportal.gdb
datasource.classname=interbase.interclient.Driver
datasource.username=sysdba
datasource.password=masterkey
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with InterBase

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:interbase://localhost/opt/data/lportal.gdb as the URL, interbase.interclient.Driver as the driver, sysdba as the user name, and masterkey as the password.

OracleAS with InterBase

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="interbase.interclient.Driver"
    url="jdbc:interbase://localhost/opt/data/lportal.gdb"
    username="sysdba"
    password="masterkey"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with InterBase

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="interbase.interclient.Driver"
    url="jdbc:interbase://localhost/opt/data/lportal.gdb"
    username="sysdba"
    password="masterkey"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with InterBase

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:interbase://localhost/opt/data/lportal.gdb as the URL, interbase.interclient.Driver as the driver, sysdba as the user name, and masterkey as the password.

Resin with InterBase

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="interbase.interclient.Driver">
        <url>jdbc:interbase://localhost/opt/data/lportal.gdb</url>
        <user>sysdba</user>
        <password>masterkey</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with InterBase

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="interbase.interclient.Driver"
    url="jdbc:interbase://localhost/opt/data/lportal.gdb"
    username="sysdba"
    password="masterkey"
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with InterBase

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=interbase.interclient.Driver, url=jdbc:interbase://localhost/opt/data/lportal.gdb, username=sysdba, and password=masterkey.

Create a data source bound to jdbc/LiferayPool.

Tomcat with InterBase

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>interbase.interclient.Driver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:interbase://localhost/opt/data/lportal.gdb</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>sysdba</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>masterkey</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="interbase.interclient.Driver"
        url="jdbc:interbase://localhost/opt/data/lportal.gdb"
        username="sysdba"
        password="masterkey"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with InterBase

Use the Administration Console to do the following:

Create a connection pool using jdbc:interbase://localhost/opt/data/lportal.gdb as the URL, interbase.interclient.Driver as the driver, sysdba as the user name, and masterkey as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with InterBase

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=interbase.interclient.Driver, url=jdbc:interbase://localhost/opt/data/lportal.gdb, user=sysdba, and password=masterkey.

2.5. JDataStore

Create a database in InterBase located at lportal.jds. At your UNIX shell or DOS prompt, type isql -U sysdba -P masterkey -d lportal.jds -i portal-jdatastore.sql.

BES with JDataStore

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>jdatastore</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>com.borland.datastore.jdbc.DataStoreDriver</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:borland:dslocal:lportal.jds</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value>sysdba</prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value>masterkey</prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with JDataStore

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:borland:dslocal:lportal.jds
     </connection-url>
     <driver-class>com.borland.datastore.jdbc.DataStoreDriver</driver-class>
     <user-name>sysdba</user-name>
     <password>masterkey</password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with JDataStore

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">com.borland.datastore.jdbc.DataStoreDriver</Set>
                        <Set name="Url">jdbc:borland:dslocal:lportal.jds</Set>
                        <Set name="User">sysdba</Set>
                        <Set name="Password">masterkey</Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with JDataStore

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:borland:dslocal:lportal.jds
datasource.classname=com.borland.datastore.jdbc.DataStoreDriver
datasource.username=sysdba
datasource.password=masterkey
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with JDataStore

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:borland:dslocal:lportal.jds as the URL, com.borland.datastore.jdbc.DataStoreDriver as the driver, sysdba as the user name, and masterkey as the password.

OracleAS with JDataStore

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.borland.datastore.jdbc.DataStoreDriver"
    url="jdbc:borland:dslocal:lportal.jds"
    username="sysdba"
    password="masterkey"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with JDataStore

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.borland.datastore.jdbc.DataStoreDriver"
    url="jdbc:borland:dslocal:lportal.jds"
    username="sysdba"
    password="masterkey"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with JDataStore

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:borland:dslocal:lportal.jds as the URL, com.borland.datastore.jdbc.DataStoreDriver as the driver, sysdba as the user name, and masterkey as the password.

Resin with JDataStore

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="com.borland.datastore.jdbc.DataStoreDriver">
        <url>jdbc:borland:dslocal:lportal.jds</url>
        <user>sysdba</user>
        <password>masterkey</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with JDataStore

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="com.borland.datastore.jdbc.DataStoreDriver"
    url="jdbc:borland:dslocal:lportal.jds"
    username="sysdba"
    password="masterkey"
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with JDataStore

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=com.borland.datastore.jdbc.DataStoreDriver, url=jdbc:borland:dslocal:lportal.jds, username=sysdba, and password=masterkey.

Create a data source bound to jdbc/LiferayPool.

Tomcat with JDataStore

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>com.borland.datastore.jdbc.DataStoreDriver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:borland:dslocal:lportal.jds</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>sysdba</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>masterkey</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="com.borland.datastore.jdbc.DataStoreDriver"
        url="jdbc:borland:dslocal:lportal.jds"
        username="sysdba"
        password="masterkey"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with JDataStore

Use the Administration Console to do the following:

Create a connection pool using jdbc:borland:dslocal:lportal.jds as the URL, com.borland.datastore.jdbc.DataStoreDriver as the driver, sysdba as the user name, and masterkey as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with JDataStore

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=com.borland.datastore.jdbc.DataStoreDriver, url=jdbc:borland:dslocal:lportal.jds, user=sysdba, and password=masterkey.

2.6. MySQL

Create a database in MySQL called lportal. At your UNIX shell or DOS prompt, type mysql lportal < portal-mysql.sql.

[Note]Note

As of version 1.8.0, the old JDBC driver org.gjt.mm.mysql.Driver is replaced with the latest JDBC driver com.mysql.jdbc.Driver. The old driver stored booleans in columns of type enum('t', 'f'), the new driver stores booleans in columns of type tinyint.

To manually update your column type, execute the SQL command alter table TableName modify column columnName tinyint;. To automatically update all your tables, execute the SQL script update1.7.5-1.8.0-mysql.sql. Follow the additional instructions from this post if you're having character encoding issues.

BES with MySQL

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>mysql</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>com.mysql.jdbc.Driver</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with MySQL

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8
     </connection-url>
     <driver-class>com.mysql.jdbc.Driver</driver-class>
     <user-name>test</user-name>
     <password>test</password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with MySQL

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">com.mysql.jdbc.Driver</Set>
                        <Set name="Url">jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8</Set>
                        <Set name="User">test</Set>
                        <Set name="Password">test</Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with MySQL

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8
datasource.classname=com.mysql.jdbc.Driver
datasource.username=test
datasource.password=test
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with MySQL

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8 as the URL, com.mysql.jdbc.Driver as the driver, test as the user name, and test as the password.

OracleAS with MySQL

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with MySQL

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with MySQL

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8 as the URL, com.mysql.jdbc.Driver as the driver, test as the user name, and test as the password.

Resin with MySQL

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="com.mysql.jdbc.Driver">
        <url>jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8</url>
        <user>test</user>
        <password>test</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with MySQL

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8"
    username="test"
    password="test"
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with MySQL

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=com.mysql.jdbc.Driver, url=jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8, username=test, and password=test.

Create a data source bound to jdbc/LiferayPool.

Tomcat with MySQL

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>com.mysql.jdbc.Driver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8"
        username="test"
        password="test"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with MySQL

Use the Administration Console to do the following:

Create a connection pool using jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8 as the URL, com.mysql.jdbc.Driver as the driver, test as the user name, and test as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with MySQL

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=com.mysql.jdbc.Driver, url=jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8, user=test, and password=test.

2.7. Oracle

Create a database in Oracle called lportal. The Oracle 9 and 10 dump scripts are available here.

Note: Do not use the default Liferay JDBC driver! The Liferay Driver was required in previous versions to work around a bug in Oracle. This is no longer required.

You must use the Oracle 10g driver located in classes12.jar whether or not you are using Oracle 9 or Oracle 10. The location of classes12.jar is usually at /oracle/product/10.2.0/db_1/jdbc/lib/classes12.jar but may be different depending on the directory where you installed Oracle.

BES with Oracle

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>oracle</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>com.liferay.jdbc.LiferayDriver</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:oracle:thin:@localhost:1521:orcl</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with Oracle

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:oracle:thin:@localhost:1521:orcl
     </connection-url>
     <driver-class>com.liferay.jdbc.LiferayDriver</driver-class>
     <user-name>test</user-name>
     <password>test</password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with Oracle

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">com.liferay.jdbc.LiferayDriver</Set>
                        <Set name="Url">jdbc:oracle:thin:@localhost:1521:orcl</Set>
                        <Set name="User">test</Set>
                        <Set name="Password">test</Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with Oracle

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:oracle:thin:@localhost:1521:orcl
datasource.classname=com.liferay.jdbc.LiferayDriver
datasource.username=test
datasource.password=test
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with Oracle

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:oracle:thin:@localhost:1521:orcl as the URL, com.liferay.jdbc.LiferayDriver as the driver, test as the user name, and test as the password.

OracleAS with Oracle

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.liferay.jdbc.LiferayDriver"
    url="jdbc:oracle:thin:@localhost:1521:orcl"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with Oracle

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.liferay.jdbc.LiferayDriver"
    url="jdbc:oracle:thin:@localhost:1521:orcl"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with Oracle

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:oracle:thin:@localhost:1521:orcl as the URL, com.liferay.jdbc.LiferayDriver as the driver, test as the user name, and test as the password.

Resin with Oracle

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="com.liferay.jdbc.LiferayDriver">
        <url>jdbc:oracle:thin:@localhost:1521:orcl</url>
        <user>test</user>
        <password>test</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with Oracle

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="com.liferay.jdbc.LiferayDriver"
    url="jdbc:oracle:thin:@localhost:1521:orcl"
    username="test"
    password="test"
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with Oracle

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=com.liferay.jdbc.LiferayDriver, url=jdbc:oracle:thin:@localhost:1521:orcl, username=test, and password=test.

Create a data source bound to jdbc/LiferayPool.

Tomcat with Oracle

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>com.liferay.jdbc.LiferayDriver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:oracle:thin:@localhost:1521:orcl</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="com.liferay.jdbc.LiferayDriver"
        url="jdbc:oracle:thin:@localhost:1521:orcl"
        username="test"
        password="test"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with Oracle

Use the Administration Console to do the following:

Create a connection pool using jdbc:oracle:thin:@localhost:1521:orcl as the URL, com.liferay.jdbc.LiferayDriver as the driver, test as the user name, and test as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with Oracle

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=com.liferay.jdbc.LiferayDriver, url=jdbc:oracle:thin:@localhost:1521:orcl, user=test, and password=test.

2.8. PostgreSQL

Create a database in PostgreSQL called lportal. At your UNIX shell, type psql -d lportal -f portal-postgresql.sql.

BES with PostgreSQL

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>postgresql</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>org.postgresql.Driver</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:postgresql://localhost/lportal</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with PostgreSQL

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:postgresql://localhost/lportal
     </connection-url>
     <driver-class>org.postgresql.Driver</driver-class>
     <user-name>test</user-name>
     <password>test</password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with PostgreSQL

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">org.postgresql.Driver</Set>
                        <Set name="Url">jdbc:postgresql://localhost/lportal</Set>
                        <Set name="User">test</Set>
                        <Set name="Password">test</Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with PostgreSQL

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:postgresql://localhost/lportal
datasource.classname=org.postgresql.Driver
datasource.username=test
datasource.password=test
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with PostgreSQL

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:postgresql://localhost/lportal as the URL, org.postgresql.Driver as the driver, test as the user name, and test as the password.

OracleAS with PostgreSQL

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="org.postgresql.Driver"
    url="jdbc:postgresql://localhost/lportal"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with PostgreSQL

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="org.postgresql.Driver"
    url="jdbc:postgresql://localhost/lportal"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with PostgreSQL

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:postgresql://localhost/lportal as the URL, org.postgresql.Driver as the driver, test as the user name, and test as the password.

Resin with PostgreSQL

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="org.postgresql.Driver">
        <url>jdbc:postgresql://localhost/lportal</url>
        <user>test</user>
        <password>test</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with PostgreSQL

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="org.postgresql.Driver"
    url="jdbc:postgresql://localhost/lportal"
    username="test"
    password="test"
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with PostgreSQL

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=org.postgresql.Driver, url=jdbc:postgresql://localhost/lportal, username=test, and password=test.

Create a data source bound to jdbc/LiferayPool.

Tomcat with PostgreSQL

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>org.postgresql.Driver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:postgresql://localhost/lportal</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="org.postgresql.Driver"
        url="jdbc:postgresql://localhost/lportal"
        username="test"
        password="test"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with PostgreSQL

Use the Administration Console to do the following:

Create a connection pool using jdbc:postgresql://localhost/lportal as the URL, org.postgresql.Driver as the driver, test as the user name, and test as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with PostgreSQL

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=org.postgresql.Driver, url=jdbc:postgresql://localhost/lportal, user=test, and password=test.

2.9. SAP

Create a database in SAP called lportal. Load the script named portal-sap.sql.

BES with SAP

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>sapdb</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>com.sap.dbtech.jdbc.DriverSapDB</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:sapdb://localhost/lportal</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with SAP

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:sapdb://localhost/lportal
     </connection-url>
     <driver-class>com.sap.dbtech.jdbc.DriverSapDB</driver-class>
     <user-name>test</user-name>
     <password>test</password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with SAP

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">com.sap.dbtech.jdbc.DriverSapDB</Set>
                        <Set name="Url">jdbc:sapdb://localhost/lportal</Set>
                        <Set name="User">test</Set>
                        <Set name="Password">test</Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with SAP

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:sapdb://localhost/lportal
datasource.classname=com.sap.dbtech.jdbc.DriverSapDB
datasource.username=test
datasource.password=test
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with SAP

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:sapdb://localhost/lportal as the URL, com.sap.dbtech.jdbc.DriverSapDB as the driver, test as the user name, and test as the password.

OracleAS with SAP

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.sap.dbtech.jdbc.DriverSapDB"
    url="jdbc:sapdb://localhost/lportal"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with SAP

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="com.sap.dbtech.jdbc.DriverSapDB"
    url="jdbc:sapdb://localhost/lportal"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with SAP

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:sapdb://localhost/lportal as the URL, com.sap.dbtech.jdbc.DriverSapDB as the driver, test as the user name, and test as the password.

Resin with SAP

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="com.sap.dbtech.jdbc.DriverSapDB">
        <url>jdbc:sapdb://localhost/lportal</url>
        <user>test</user>
        <password>test</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with SAP

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="com.sap.dbtech.jdbc.DriverSapDB"
    url="jdbc:sapdb://localhost/lportal"
    username="test"
    password="test"
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with SAP

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=com.sap.dbtech.jdbc.DriverSapDB, url=jdbc:sapdb://localhost/lportal, username=test, and password=test.

Create a data source bound to jdbc/LiferayPool.

Tomcat with SAP

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>com.sap.dbtech.jdbc.DriverSapDB</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:sapdb://localhost/lportal</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="com.sap.dbtech.jdbc.DriverSapDB"
        url="jdbc:sapdb://localhost/lportal"
        username="test"
        password="test"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with SAP

Use the Administration Console to do the following:

Create a connection pool using jdbc:sapdb://localhost/lportal as the URL, com.sap.dbtech.jdbc.DriverSapDB as the driver, test as the user name, and test as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with SAP

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=com.sap.dbtech.jdbc.DriverSapDB, url=jdbc:sapdb://localhost/lportal, user=test, and password=test.

2.10. SQL Server

Create a database in SQL Server called lportal. Use Enterprise Manager to load the script named portal-sql-server.sql.

BES with SQL Server

Create a data source bound to jdbc/LiferayPool by editing jndi-definitions and creating liferay.dar. DAR files are custom to BES. You can use the BES Deployment Descriptor Editor to create the DAR file.

<jndi-definitions>
    <visitransact-datasource>
        <jndi-name>jdbc/LiferayPool</jndi-name>
        <driver-datasource-jndiname>datasources/JdsLiferayDriver</driver-datasource-jndiname>
        <property>
            <prop-name>connectionType</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>Direct</prop-value>
        </property>
        <property>
            <prop-name>dialect</prop-name>
            <prop-type>Enumerated</prop-type>
            <prop-value>sqlserver</prop-value>
        </property>
    </visitransact-datasource>
    <driver-datasource>
        <jndi-name>datasources/JdsLiferayDriver</jndi-name>
        <datasource-class-name>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</datasource-class-name>
        <log-writer>False</log-writer>
        <property>
            <prop-name>driver</prop-name>
            <prop-type>String</prop-type>
            <prop-value>net.sourceforge.jtds.jdbc.Driver</prop-value>
        </property>
        <property>
            <prop-name>url</prop-name>
            <prop-type>String</prop-type>
            <prop-value>jdbc:jtds:sqlserver://localhost/lportal</prop-value>
        </property>
        <property>
            <prop-name>username</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
        <property>
            <prop-name>password</prop-name>
            <prop-type>String</prop-type>
            <prop-value>test</prop-value>
        </property>
    </driver-datasource>
</jndi-definitions>

Copy the JDBC driver to a path that can be picked up by BES. JDBC drivers can be found from the database vendor's web site.

JBoss with SQL Server

Create a data source bound to jdbc/LiferayPool by editing liferay-ds.xml.

<datasources>
   <local-tx-datasource>
     <jndi-name>jdbc/LiferayPool</jndi-name>
     <connection-url>
         jdbc:jtds:sqlserver://localhost/lportal
     </connection-url>
     <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
     <user-name>test</user-name>
     <password>test</password>
     <min-pool-size>0</min-pool-size>
   </local-tx-datasource>
</datasources>

Copy the JDBC driver for to /server/default/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Jetty with SQL Server

Create a data source bound to jdbc/LiferayPool by editing /etc/jetty.xml.

<Call name="addService">
    <Arg>
        <New class="org.mortbay.jetty.plus.JotmService">
            <Set name="Name">TransactionMgr</Set>
            <Call name="addDataSource">
                <Arg>jdbc/LiferayPool</Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.standard.StandardXADataSource">
                        <Set name="DriverName">net.sourceforge.jtds.jdbc.Driver</Set>
                        <Set name="Url">jdbc:jtds:sqlserver://localhost/lportal</Set>
                        <Set name="User">test</Set>
                        <Set name="Password">test</Set>
                    </New>
                </Arg>
                <Arg>
                    <New class="org.enhydra.jdbc.pool.StandardXAPoolDataSource">
                        <Arg type="Integer">4</Arg>
                        <Set name="MinSize">4</Set>
                        <Set name="MaxSize">15</Set>
                    </New>
                </Arg>
            </Call>
        </New>
    </Arg>
</Call>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

JOnAS with SQL Server

Create a data source bound to jdbc/LiferayPool by editing /conf/jonas/liferay-ds.properties.

datasource.name=jdbc/LiferayPool
datasource.url=jdbc:jtds:sqlserver://localhost/lportal
datasource.classname=net.sourceforge.jtds.jdbc.Driver
datasource.username=test
datasource.password=test
datasource.mapper=

Copy the JDBC driver for to /lib/ext. JDBC drivers can be found from the database vendor's web site.

JRun with SQL Server

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:jtds:sqlserver://localhost/lportal as the URL, net.sourceforge.jtds.jdbc.Driver as the driver, test as the user name, and test as the password.

OracleAS with SQL Server

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    url="jdbc:jtds:sqlserver://localhost/lportal"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver to /j2ee/home/lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't already another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Orion with SQL Server

Create a data source bound to jdbc/LiferayPool, create a Tx data source bound to jdbc/LiferayEJB, and set the proper JDBC properties by editing /config/data-sources.xml.

<data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="Liferay"
    location="jdbc/LiferayCore"
    pooled-location="jdbc/LiferayPool"
    xa-location="jdbc/xa/LiferayXA"
    ejb-location="jdbc/LiferayEJB"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    url="jdbc:jtds:sqlserver://localhost/lportal"
    username="test"
    password="test"
    inactivity-timeout="30"
    schema="database-schemas/"
/>

Copy the JDBC driver for to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Pramati with SQL Server

Use the Management Console to do the following:

Create a data source bound to jdbc/LiferayPool using jdbc:jtds:sqlserver://localhost/lportal as the URL, net.sourceforge.jtds.jdbc.Driver as the driver, test as the user name, and test as the password.

Resin with SQL Server

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /conf/resin.conf.

<database>
    <jndi-name>jdbc/LiferayPool</jndi-name>
    <driver type="net.sourceforge.jtds.jdbc.Driver">
        <url>jdbc:jtds:sqlserver://localhost/lportal</url>
        <user>test</user>
        <password>test</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
</database>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

RexIP with SQL Server

Create a data source bound to jdbc/LiferayPool and set the proper JDBC properties by editing /server.xml.

<datasource
    name="LiferayPool"
    jndi-name="jdbc/LiferayPool"
    driver="net.sourceforge.jtds.jdbc.Driver"
    url="jdbc:jtds:sqlserver://localhost/lportal"
    username="test"
    password="test"
    max-pool="100"
    transactional="false"
/>

Copy the JDBC driver to /lib. JDBC drivers can be found from the database vendor's web site.

Make sure there isn't another data source bound to jdbc/LiferayPool. If there is a duplicate service, undeploy it by removing its xml configuration.

Sun JSAS with SQL Server

Use the Administration Console to do the following:

Create a connection pool org.apache.commons.dbcp.BasicDataSource as the data source class. The pool properties are driverClassName=net.sourceforge.jtds.jdbc.Driver, url=jdbc:jtds:sqlserver://localhost/lportal, username=test, and password=test.

Create a data source bound to jdbc/LiferayPool.

Tomcat with SQL Server

For Tomcat 5.0.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/liferay.xml.

<Context...>
    ...
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
    />
    <ResourceParams name="jdbc/LiferayPool">
        <parameter>
            <name>driverClassName</name>
            <value>net.sourceforge.jtds.jdbc.Driver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:jtds:sqlserver://localhost/lportal</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>test</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
    </ResourceParams>
</Context>

For Tomcat 5.5.x, create a data source bound to jdbc/LiferayPool by editing /conf/Catalina/localhost/ROOT.xml.

<Context...>
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="net.sourceforge.jtds.jdbc.Driver"
        url="jdbc:jtds:sqlserver://localhost/lportal"
        username="test"
        password="test"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
</Context>

For Tomcat 5.0.x and 5.5.x, copy the JDBC driver to /common/lib. JDBC drivers can be found from the database vendor's web site.

WebLogic with SQL Server

Use the Administration Console to do the following:

Create a connection pool using jdbc:jtds:sqlserver://localhost/lportal as the URL, net.sourceforge.jtds.jdbc.Driver as the driver, test as the user name, and test as the password.

Create a data source bound to jdbc/LiferayPool.

Create a Tx data source bound to jdbc/LiferayEJB.

WebSphere with SQL Server

Use the Administrative Console: Resources -> JDBC Providers.

Create a new user-defined JDBC provider. Remove any references in the class path. Set org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS as the implementation class name.

Copy commons-dbcp.jar, commons-pool.jar, and your JDBC driver to /AppServer/lib/ext.

Create a data source bound to jdbc/LiferayPool. The custom properties are driver=net.sourceforge.jtds.jdbc.Driver, url=jdbc:jtds:sqlserver://localhost/lportal, user=test, and password=test.

3. Mail Servers

Liferay Portal Enterprise can integrate with Washington IMAP+Sendmail, Cyrus IMAP+Postfix, and Dovecot+Postfix. Support for integration with Microsoft Exchange and other IMAP servers are planned and will be implemented in the near future.

The portal synchronizes with the mail server's user authentication by adding a mail server account when a portal account is added, deleting a mail server account when a portal account is deleted, and updating a mail server account when a portal account is updated. To do this, the portal must have privileges to modify and to update the mail server's user database.

The portal must also keep track of how email addresses map to certain accounts. For example, in the default installation, the portal maps the user id liferay.com.1 to the email address test@liferay.com.

One possible deployment scenario is to run the mail EJBs on the mail server and run the portal EJBs on the web server. In this case, the mail server and web server are two different machines. The portal EJBs will give abstract commands (add/delete/update user) to the remote mail EJBs to carry out. The mail EJBs then run the appropriate system commands for the specific mail server and operating system.

Another possible deployment scenario is to have the mail EJBs and portal EJBs run on the same machine. This can all be configured by editing portal.properties.

Users access their email through an IMAP server. Access is limited to IMAP so that the portal does not have to be programmed to know where to persist the mail.

3.1. Washington IMAP+Sendmail

  1. Install Sendmail and Expect on your mail server. Expect allows you to add, delete, or update users in one command. An example script for Red Hat is included in /mail-ejb/scripts/redhat.

  2. Configure /portal-ejb/classes/portal.properties for your mail server.

  3. The following instructions assume:

    • The server envronment is linux

    • The server name is called PORTAL_HOST

    • You are logged in as root

    • The distribution is Liferay Portal Professional 3.2.0 (Bundled with Tomcat)

    • Tomcat is installed at /usr/local/tomcat

    • Tomcat is running under the user named tomcat, group name tomcat

    • You are using sendmail for email

    • Portal sendmail users are created under the path /home/liferay/users

    • sendmail is running on PORTAL_HOST

# Install expect command
apt-get install expect


# Give tomcat user a password
passwd tomcat




#give tomcat user a login shell
vi /etc/passwd
tomcat:x:500:500::/usr/local/tomcat:/bin/bash




# Use sudo to allow tomcat to add users
visudo

Defaults logfile=/var/log/sudolog
Defaults:tomcat    timestamp_timeout=-1, passwd_tries=1
tomcat  ALL=/usr/sbin/adduser, /usr/sbin/userdel, /usr/bin/passwd




# Enable UW-imap
vi /etc/xinet.d/imap

# default: off
# description: The IMAP service allows remote users to access their mail using \
#              an IMAP client such as Mutt, Pine, fetchmail, or Netscape \
#              Communicator.
service imap
{
       socket_type             = stream
       wait                    = no
       user                    = root
       server                  = /usr/sbin/imapd
       log_on_success  += HOST DURATION
       log_on_failure  += HOST
       disable                 = no
}


# Restart the xinetd deamon
/etc/rc.d/init.d/xinetd restart




# Add Tomcat mail/MailSession settings
vi /usr/local/tomcat/conf/Catalina/localhost/liferay.xml
               <parameter>
                       <name>mail.smtp.host</name>
                       <value>localhost</value>
               </parameter>
               <parameter>
                       <name>mail.imap.host</name>
                       <value>localhost</value>
               </parameter>
               <parameter>
                       <name>mail.store.protocol</name>
                       <value>imap</value>
               </parameter>
               <parameter>
                       <name>mail.transport.protocol</name>
                       <value>smtp</value>
               </parameter>
               <parameter>
                       <name>mail.pop3.host</name>
                       <value>localhost</value>
               </parameter>



# Make the email mapping table writable by tomcat
chmod 664    /etc/mail/virtusertable
chmod 664    /etc/mail/virtusertable.db
chgrp tomcat /etc/mail/virtusertable



# Create lucent paths
mkdir /usr/local/tomcat/liferay/lucene


# Create sendmail users path
mkdir /home/liferay
mkdir /home/liferay/users

chown -R tomcat /home/liferay
chgrp -R tomcat /home/liferay
chmod -R 660    /home/liferay





# Create custom portal properties
# see http://www.liferay.com/static/content/portal.properties.html

vi /usr/local/tomcat/common/classes/portal-ext.properties

mail.hook.impl=com.liferay.mail.util.SendmailHook
mail.mx.update=true
mail.hook.sendmail.add.user=/usr/local/tomcat/bin/autouseradd %1%
mail.hook.sendmail.change.password=/usr/local/tomcat/bin/autopasswd %1% %2%
mail.hook.sendmail.delete.user=/usr/local/tomcat/bin/autouserdel %1%
mail.hook.sendmail.home=/home/liferay/users
mail.hook.sendmail.virtusertable=/etc/mail/virtusertable
mail.box.style=mail/
mail.username.replace=true
passwords.allow.dictionary.word=false
mail.junk-mail.warning.size=512000
mail.trash.warning.size=512000
mail.attachments.max.size=3072000
mail.audit.trail=root@PORTAL_HOST
lucene.dir /usr/local/tomcat/liferay/lucene/








# Create change password command
vi /usr/local/tomcat/bin/autopasswd

#!/usr/bin/expect -f
set password [lindex $argv 1]

spawn sudo /usr/bin/passwd [lindex $argv 0]
expect -i  $spawn_id "password:"
sleep .5
send "$password\r"
expect "password:"W
sleep .5
send "$password\r"
expect eof





# Create user add command
vi /usr/local/tomcat/bin/autouseradd

#!/usr/bin/expect -f
# 1st argument is the user id to add.
# Note: setting mail.username.replace=true in /common/classes/portal-ext.properties
#   will replace the .'s with _'s in userid, which is required for linux

set userid [lindex $argv 0]
spawn sudo /usr/sbin/adduser $userid -s /bin/false
expect eof






# Create user remove command
vi /usr/local/tomcat/bin/autouserdel

#!/usr/bin/expect -f
# 1st argument is the user id to remove
# Note: setting mail.username.replace=true in /common/classes/portal-ext.properties
#   will replace the .'s with _'s in userid, which is required for linux

set userid [lindex $argv 0]
spawn sudo /usr/sbin/userdel -r $userid
expect eof




# Set command file permissions
chmod 700    /usr/local/tomcat/bin/autopasswd
chown tomcat /usr/local/tomcat/bin/autopasswd
chgrp tomcat /usr/local/tomcat/bin/autopasswd
chmod 700    /usr/local/tomcat/bin/autouseradd
chown tomcat /usr/local/tomcat/bin/autouseradd
chgrp tomcat /usr/local/tomcat/bin/autouseradd
chmod 700    /usr/local/tomcat/bin/autouserdel
chown tomcat /usr/local/tomcat/bin/autouserdel
chgrp tomcat /usr/local/tomcat/bin/autouserdel





# Activate tomcat sudo, so it never prompts again
su tomcat
/usr/local/tomcat/bin/autouseradd badusername
/usr/local/tomcat/bin/autopasswd  badusername asst1453
/usr/local/tomcat/bin/autouserdel badusername
exit

3.2. Cyrus IMAP+Postfix

  1. Install Fedora Core 4.

    For a minimal installation, choose to install a custom server. Deselect all packages groups. Select the package groups: Text-based Internet, Mail Server, DNS Name Server, FTP Server, MySQL Database, Network Servers, Development Tools, Legacy Software Development, Administration Tools, and System Tools.

    Make sure the following RPMs are also selected. The packages cyrus-imapd and cyrus-imapd-utils are only available in Fedora Core 2 and Fedora Core 4. They were not part of Fedora Core 1 and needed to be compiled manually. In Fedora Core 4, they were moved to Extras and you will need to use yum to install these packages.

    Mail Server: +cyrus-imapd, +cyrus-imapd-utils

    MySQL Database: +mysql-server

    Development Tools: +expect

  2. Update Fedora. This may take a while even if you have a fast connection.

    rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora yum list yum upgrade

  3. Turn off Sendmail.

    chkconfig --level 3 sendmail off
    /etc/rc.d/init.d/sendmail stop
  4. Edit /etc/sysconfig/saslauthd.

    Replace MECH=shadow with MECH=pam.

    Turn on Cyrus SASL.

    chkconfig --level 3 saslauthd on
    /etc/rc.d/init.d/saslauthd start
  5. Download Cyrus IMAP. If you are using Fedora Core 2 or later, you can use the RPMs from Fedora: cyrus-imapd and cyrus-imapd-utils. If you are using Fedora Core 1 or an earlier version of Red Hat, download cyrus-imapd-2.1.16-6.src.rpm and build the RPM for your environment from the source distribution.

    Build Cyrus IMAP.

    rpmbuild --rebuild cyrus-imapd-2.1.16-6.src.rpm

    Install Cyrus IMAP.

    rpm -i cyrus-imapd-2.1.16-6.i386.rpm

    rpm -i cyrus-imapd-utils-2.1.16-6.i386.rpm

    Turn on Cyrus IMAP.

    chkconfig --level 3 cyrus-imapd on

    /etc/rc.d/init.d/cyrus-imapd start

  6. Download the source distribution of Postfix.

    Install Postfix with support for MySQL and Cyrus SASL.

    rpm -ivh postfix-2.1.6-1.src.rpm

    cd /usr/src/redhat/SOURCES

    bash

    export POSTFIX_MYSQL_REDHAT=1

    export POSTFIX_SASL=2

    export POSTFIX_TLS=1

    sh make-postfix.spec

    exit

    cd /usr/src/redhat/SPECS

    rpmbuild -ba postfix.spec

    cd /usr/src/redhat/RPMS/i386

    rpm -i --force postfix-2.1.6-1.mysql.sasl2.tls.fc4.i386.rpm

  7. Download the source distribution of PAM MySQL.

    Install PAM MySQL.

    rpm -ivh pam_mysql-0.5-0.src.rpm

    cd /usr/src/redhat/SPECS

    rpmbuild -ba pam_mysql.spec

    cd /usr/src/redhat/RPMS/i386

    rpm -i pam_mysql-0.5-0.i386.rpm

  8. Copy /mail-ejb/scripts/fedora/cyrus/mysql_virtual.cf to /etc/postfix/mysql_virtual.cf. Modify mysql_virtual.cf to point to your MySQL database.

    Edit /etc/postfix/virtual. Add the line yourdomain.com anything for each virtual domain that Postfix will manage. A correspending entry is needed in the MySQL database so that email to postmaster@yourdomain.com can be delivered to a Cyrus IMAP account.

    Transform /etc/postfix/virtual to a format Postfix can read.

    postmap /etc/postfix/virtual

    Edit /etc/postfix/master.cf. Replace the two instances of /cyrus/bin/deliver with /usr/lib/cyrus-imapd/deliver. Add these two lines:

    procmail  unix  -       n       n       -       -       pipe
      flags=R user=cyrus argv=/usr/bin/procmail -t -m USER=${user}
    EXTENSION=${extension} /home/cyrus/procmailrc

    Edit /etc/postfix/main.cf. Add these lines:

    #
    # Custom Settings
    #
    
    mynetworks = 127.0.0.0/8, 192.168.0.0/16, 128.135.12.7/32
    
    mailbox_command = /usr/bin/procmail -t -a "$EXTENSION"
    mailbox_transport = procmail
    
    virtual_maps = hash:/etc/postfix/virtual, mysql:/etc/postfix/mysql_virtual.cf
    
    smtpd_recipient_restrictions = permit_mynetworks, check_client_access hash:/etc/postfix/pop-before-smtp, check_relay_domains

    Set mynetworks to the IPs that are allowed to connect to Postfix. Turn on Postfix.

    chkconfig --level 3 postfix on

    /etc/rc.d/init.d/postfix start

  9. Copy /mail-ejb/scripts/fedora/cyrus/procmailrc to /home/cyrus/procmailrc. Make sure the cyrus user can access the script.

    chown cyrus:mail /home/cyrus

    chown cyrus:mail /home/cyrus/procmailrc.

    Copy /mail-ejb/scripts/fedora/cyrus/cyrus_adduser to /usr/bin/cyrus_adduser. Edit cyrus_adduser and replace localhost with the mail server's host name. Make sure the script can be executed.

    chmod u+x /usr/bin/cyrus_adduser.

    Copy /mail-ejb/scripts/fedora/cyrus/cyrus_userdel to /usr/bin/cyrus_userdel. Edit cyrus_userdel and replace localhost with the mail server's host name. Make sure the script can be executed.

    chmod u+x /usr/bin/cyrus_userdel.

    [Note]Note

    If you copy cyrus_adduser and cyrus_userdel from a Windows environment to a Linux environment, you need to run dos2unix cyrus_adduser to convert the file so that Linux can read the file correctly.

  10. Edit /etc/pam.d/pop so that POP authentication is checked via MySQL. Remove the current lines and add these lines:

    #%PAM-1.0
    auth sufficient pam_mysql.so user=dbuser passwd=dbpassword host=127.0.0.1 db=cyrus
    table=CyrusUser usercolumn=userId passwdcolumn=password_ crypt=0
    
    account required pam_mysql.so user=dbuser passwd=dbpassword host=127.0.0.1 db=cyrus
    table=CyrusUser usercolumn=userId passwdcolumn=password_ crypt=0

    Edit /etc/pam.d/imap so that IMAP authentication is checked via MySQL. Remove the current lines and add these lines:

    #%PAM-1.0
    auth sufficient pam_mysql.so user=dbuser passwd=dbpassword host=127.0.0.1 db=cyrus
    table=CyrusUser usercolumn=userId passwdcolumn=password_ crypt=0
    
    account required pam_mysql.so user=dbuser passwd=dbpassword host=127.0.0.1 db=cyrus
    table=CyrusUser usercolumn=userId passwdcolumn=password_ crypt=0
  11. Turn on MySQL.

    chkconfig --level 3 mysqld on

    /etc/rc.d/init.d/mysqld start

    Configure MySQL so that it can be accessed by the username dbuser and password dbpassword.

    use mysql;

    insert into user values ('127.0.0.1', "dbuser", password("dbpassword"), "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y");

    Create the database and tables that will be used to authenticate IMAP users.

    create database cyrus;

    use cyrus;

    create table CyrusUser ( userId varchar(75) not null primary key, password_ varchar(75) not null );

    create table CyrusVirtual ( emailAddress varchar(75) not null primary key, userId varchar(75) not null );

    The Expect scripts cyrus_adduser and cyrus_userdel that are used to add and delete Cyrus IMAP users require a default cyrus user to authenticate with.

    insert into CyrusUser (userId, password_) values ('cyrus', 'cyrus_password');

    Every virtual domain requires a postmaster@yourdomain.com entry so that email to postmaster@yourdomain.com can be delivered to a Cyrus IMAP account.

    insert into CyrusVirtual (emailAddress, userId) values ('postmaster@yourdomain.com', 'your_domain_1');

    Create a default account for your_domain_1.

    insert into CyrusUser (userId, password_) values ('your_domain_1', 'your_password');

    insert into CyrusVirtual (emailAddress, userId) values ('joe.blogs@yourdomain.com', 'your_domain_1');

    quit;

    cyrus_adduser cyrus_password your_domain_1

  12. Turn on SpamAssassin.

    chkconfig --level 3 spamassassin on

    /etc/rc.d/init.d/spamassassin start

  13. Download ClamAV.

    Install ClamAV.

    rpm -i clamav-0.86.1-1.i386.rpm

    Turn on ClamAV.

    chkconfig --level 3 clamd on

    /etc/rc.d/init.d/clamd start

    Download ClamAssassin.

    Install ClamAssassin.

    gunzip clamassassin-1.2.2.tar.gz

    tar xvf clamassassin-1.2.2.tar

    cd clamassassin-1.2.2

    ./configure

    cp clamassassin /usr/local/bin

    Edit /usr/local/bin/clamassassin.

    Set SUBJECTHEAD to "[VIRUS] ".

  14. Copy /mail-ejb/scripts/fedora/cyrus/procmail_vacation to /usr/local/bin/procmail_vacation. Make sure the script can be executed.

    chmod u+x /usr/local/bin/procmail_vacation.

    Download SendEmail.

    Install SendEmail.

    gunzip sendEmail-v1.52.tar.gz

    tar xvf sendEmail-v1.52.tar

    cd sendEmail-v1.52

    chmod u+x sendEmail

    chown cyrus:mail sendEmail

    cp sendEmail /usr/local/bin

  15. Download the source distribution of Pop-before-smtp.

    Pop-before-smtp requires perl-TimeDate and perl-Net-Netmask.

    Install perl-TimeDate from the distributed RPM.

    Install perl-Net-Netmask.

    perl -MCPAN -e 'install Net::Netmask'

    Install Pop-before-smtp.

    gunzip pop-before-smtp-1.38.tar.gz

    tar xvf pop-before-smtp-1.38.tar

    cd pop-before-smtp-1.38

    chown root:root *

    cp pop-before-smtp.init /etc/rc.d/init.d/pop-before-smtp

    cp pop-before-smtp /usr/sbin/

    cp pop-before-smtp-conf.pl /etc

    Edit /etc/pop-before-smtp-conf.pl by uncommenting and modifying certain sections so it matches the following information.

    $dbfile = '/etc/postfix/pop-before-smtp';
    
    $grace = 120*60;
    
    # Set the log file we will watch for pop3d/imapd records.
    $file_tail{'name'} = '/var/log/maillog';
    
    # For Cyrus (including a tweak for IP addrs that don't resolve):
    $pat = '^(... .. ..:..:..) \S+ (?:pop3d|imapd)\[\d+\]: ' .

    Turn on Pop-before-smtp.

    chkconfig --level 3 pop-before-smtp on

    /etc/rc.d/init.d/pop-before-smtp start

  16. Restart your mail server.

    shutdown -r now

3.3. Dovecot+Postfix

First build a generic Liferay email hook, ShellHook.java, that shells out all of the email methods. You install it by adding these lines to portal-ext.properties: mail.hook.impl=com.liferay.mail.util.ShellHook

mail.hook.shell.script=/usr/sbin/mailadmin.ksh

mail.box.style=INBOX

We next built a generic Korn Shell Script, mailadmin.ksh, that implements each method for Dovecot, or any other email system you want. It supports an interactive command line interface for testing:

mailadmin.ksh --help

mailadmin.ksh

mailadmin.ksh addForward [userId] [emailAddresses]

mailadmin.ksh addUser [userId] [password] [firstName] [middleName] [lastName] [emailAddress]

mailadmin.ksh addVacationMessage [userId] [emailAddress] [vacationMessage]

mailadmin.ksh deleteEmailAddress [userId]

mailadmin.ksh deleteUser [userId]

mailadmin.ksh updateBlocked [userId] [blockedEmailAddress]

mailadmin.ksh updateEmailAddress [userId] [emailAddress]

mailadmin.ksh updatePassword [userId] [password]

All of the code is in SVN. mailadmin is at: mail-ejb/scripts/fedora/ksh/mailadmin.ksh Here are the step-by-step installation instructions:


# Edit SASL-auth authentication to use MySQL with the Postfix setup

vi /etc/pam.d/smtp
#%PAM-1.0
auth sufficient pam_mysql.so user=DBUSR passwd=DBPASSWD host=127.0.0.1 db=mail table=postfix_users usercolumn=email passwdcolumn=clear crypt=0
account required pam_mysql.so user=DBUSR passwd=DBPASSWD host=127.0.0.1 db=mail table=postfix_users usercolumn=email passwdcolumn=clear crypt=0





# CONFIGURE VMAIL USER AND EMAIL PATHS

groupadd -g 510 vmail
useradd  -u 510 -g vmail vmail
mkdir -p /var/vmail/EMAILDOMAIN
chown -R vmail:vmail /var/vmail
chmod -R 770         /var/vmail

# Add vmail user to tomcat group and tomcat user to vmail group
# Note the vmail uid, 510, is inserted into the postfix_users table below
vi /etc/group
tomcat:x:500:vmail
vmail:x:510:tomcat




# CONFIGURE MYSQL

#  Add DBUSR to MySql database for managing email tables

mysql -u root -p
use mysql;
insert into user values ('127.0.0.1', "DBUSR", old_password("DBPASSWD"), "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y");
commit;
quit


# Login as email user and build email database, "mail", and postfix tables
mysql -u DBUSR -p

create database mail;
use mail;

CREATE TABLE postfix_alias (
 id int(11) unsigned NOT NULL auto_increment,
 alias varchar(128) NOT NULL default '',
 destination varchar(128) NOT NULL default '',
 PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE postfix_relocated (
 id int(11) unsigned NOT NULL auto_increment,
 email varchar(128) NOT NULL default '',
 destination varchar(128) NOT NULL default '',
 PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE postfix_transport (
 id int(11) unsigned NOT NULL auto_increment,
 domain varchar(128) NOT NULL default '',
 destination varchar(128) NOT NULL default '',
 PRIMARY KEY (id),
 UNIQUE KEY domain (domain)
) TYPE=MyISAM;

CREATE TABLE postfix_users (
 id int(11) unsigned NOT NULL auto_increment,
 email varchar(128) NOT NULL default '',
 clear varchar(128) NOT NULL default '',
 crypt varchar(128) NOT NULL default '',
 name tinytext NOT NULL,
 uid int(11) unsigned NOT NULL default '1004',
 gid int(11) unsigned NOT NULL default '1004',
 homedir tinytext NOT NULL,
 maildir tinytext NOT NULL,
 quota tinytext NOT NULL,
 access enum('Y','N') NOT NULL default 'Y',
 postfix enum('Y','N') NOT NULL default 'Y',
 PRIMARY KEY (id),
 UNIQUE KEY email (email)
) TYPE=MyISAM;

CREATE TABLE postfix_virtual (
 id int(11) unsigned NOT NULL auto_increment,
 email varchar(128) NOT NULL default '',
 destination varchar(128) NOT NULL default '',
 PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE postfix_access (
 id int(10) unsigned NOT NULL auto_increment,
 source varchar(128) NOT NULL default '',
 access varchar(128) NOT NULL default '',
 type enum('recipient','sender','client') NOT NULL default 'recipient',
 PRIMARY KEY (id)
) TYPE=MyISAM

commit;

#  Add an email domain
INSERT INTO `postfix_transport` VALUES
(3,'EMAILDOMAIN','virtual:');
#  Add an email user (automated by Liferay using ShellHook, and mailadmin.ksh)
#  vmail uid is 510
INSERT INTO `postfix_users` VALUES
(17,'LIFERAYUSR@EMAILDOMAIN','LIFERAYPWD','','',510,510,'/var/vmail','EMAILDOMAIN/LIFERAYUSR/Maildir/','','Y','Y');
#  Add an email forward
INSERT INTO `postfix_virtual` VALUES
(27,'LIFERAYLOGIN','LIFERAYUSR@EMAILDOMAIN');

commit;
quit








# CONFIGURE POSTFIX

cd /etc/postfix/
rm -rf ssl/
rm -rf sasl/


vi /etc/postfix/mysql-aliases.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_alias
select_field = destination
where_field = alias
hosts = 127.0.0.1

vi /etc/postfix/mysql-client.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_access
select_field = access
where_field = source
additional_conditions = and type = 'client'
hosts = 127.0.0.1

vi /etc/postfix/mysql-recipient.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_access
select_field = access
where_field = source
additional_conditions = and type = 'recipient'
hosts = 127.0.0.1

vi /etc/postfix/mysql-relocated.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_relocated
select_field = destination
where_field = email
hosts = 127.0.0.1

vi /etc/postfix/mysql-sender.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_access
select_field = access
where_field = source
additional_conditions = and type = 'sender'
hosts = 127.0.0.1

vi /etc/postfix/mysql-transport.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_transport
select_field = destination
where_field = domain
hosts = 127.0.0.1

vi /etc/postfix/mysql-virtual-gid.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_users
select_field = gid
where_field = email
additional_conditions = and postfix = 'y'
hosts = 127.0.0.1

vi /etc/postfix/mysql-virtual-maps.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_users
select_field = maildir
where_field = email
additional_conditions = and postfix = 'y'
hosts = 127.0.0.1

vi /etc/postfix/mysql-virtual-uid.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_users
select_field = uid
where_field = email
additional_conditions = and postfix = 'y'
hosts = 127.0.0.1

vi /etc/postfix/mysql-virtual.cf
user = DBUSR
password = DBPASSWD
dbname = mail
table = postfix_virtual
select_field = destination
where_field = email
hosts = 127.0.0.1

chmod 640          /etc/postfix/mysql-*
chown root:postfix /etc/postfix/mysql-*


vi /etc/postfix/main.cf
# see /usr/share/postfix/main.cf.dist for a commented, fuller version of this file.
# Do not change these directory settings - they are critical to Postfix operation.
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
program_directory = /usr/libexec/postfix
smtpd_banner = $myhostname ESMTP $mail_name
setgid_group = postdrop
biff = no
append_dot_mydomain = no
myhostname = EMAILDOMAIN
myorigin = $myhostname
mydestination = EMAILDOMAIN, $transport_maps
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-recipient.cf, reject_unauth_destination, permit
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-client.cf
alias_maps = mysql:/etc/postfix/mysql-aliases.cf
relocated_maps = mysql:/etc/postfix/mysql-relocated.cf
transport_maps = mysql:/etc/postfix/mysql-transport.cf
virtual_maps = mysql:/etc/postfix/mysql-virtual.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual-uid.cf
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual-gid.cf
local_recipient_maps = $alias_maps $virtual_mailbox_maps



chmod 644        /etc/postfix/main.cf
chown root:root  /etc/postfix/main.cf


vi /etc/postfix/master.cf
smtp     inet  n       -       n       -       -       smtpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
maildrop  unix  -       n       n       -       -       pipe
 flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
old-cyrus unix  -       n       n       -       -       pipe
 flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
cyrus     unix  -       n       n       -       -       pipe
 user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
uucp      unix  -       n       n       -       -       pipe
 flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail.postfix ($recipient)
ifmail    unix  -       n       n       -       -       pipe
 flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
 flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
procmail  unix  -       n       n       -       -       pipe
 flags=R user=cyrus argv=/usr/bin/procmail -t -m USER=${user} EXTENSION=${extension} /home/cyrus/procmailrc




chmod 644       /etc/postfix/master.cf
chown root:root /etc/postfix/master.cf




# CONFIGURE DOVECOT

cd
wget http://dag.wieers.com/packages/dovecot/dovecot-0.99.13-1.1.el3.rf.i386.rpm
apt-get install rh-postgresql-libs
rpm -Uvh dovecot-0.99.13-1.1.el3.rf.i386.rpm


vi /etc/dovecot.conf
protocols =  imaps pop3s imap pop3
ssl_disable = yes
ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem
login = imap
login_executable = /usr/libexec/dovecot/imap-login
login = pop3
login_executable = /usr/libexec/dovecot/pop3-login
mail_extra_groups = mail
default_mail_env = maildir:/var/vmail/%d/%n/Maildir
imap_executable = /usr/libexec/dovecot/imap
pop3_executable = /usr/libexec/dovecot/pop3
auth = default
auth_mechanisms = plain
auth_default_realm = EMAILDOMAIN
auth_userdb = mysql /etc/dovecot-mysql.conf
auth_passdb = mysql /etc/dovecot-mysql.conf
auth_user = root
auth_verbose = yes



vi /etc/dovecot-mysql.conf
db_host = 127.0.0.1
db_port = 3306
db = mail
db_user = DBUSR
db_passwd = DBPASSWD
db_client_flags = 0
default_pass_scheme = PLAIN
password_query = SELECT clear FROM postfix_users WHERE email = '%n@%d' or email = '%n@EMAILDOMAIN'
user_query = SELECT maildir, uid, gid FROM postfix_users WHERE email = '%n@%d' or email = '%n@EMAILDOMAIN'



# CONFIGURE LIFERAY

# configure mailadmin.ksh
cp mailadmin.ksh /usr/sbin
vi  /usr/sbin/mailadmin.ksh
DOMAIN=EMAILDOMAIN              # Domain being managed
MYSQL_USERNAME=DBUSR              # MySQL user
MYSQL_PASSWORD=DBPASSWD             # MySQL password
TOMCAT_UID=500                       # Mail File Creation user id - tomcat
VMAIL_GID=510                       # Mail File Creation group id - vmail


chmod 750           /usr/sbin/mailadmin.ksh
chown tomcat:tomcat /usr/sbin/mailadmin.ksh

# create mailadmin log file
touch               /var/log/mailadmin.log
chmod 660           /var/log/mailadmin.log
chown tomcat:tomcat /var/log/mailadmin.log

# configure liferay to use mailadmin.ksh
vi /usr/local/tomcat/common/classes/portal-ext.properties
  mail.hook.impl=com.liferay.mail.util.ShellHook
  mail.hook.shell.script=/usr/sbin/mailadmin.ksh
  mail.box.style=INBOX

# update these JARs with latest from SVN HEAD  
/usr/local/tomcat/common/lib/ext/mail-ejb.jar   -> add com.liferay.mail.util.ShellHook.class
/usr/local/tomcat/common/lib/ext/portal-ejb.jar -> update com.liferay.portal.util.PropsUtil.class
/usr/local/tomcat/common/lib/ext/portal-ejb.jar -> update com.liferay.util.StringUtil.class


# Configure Tomcat

#add mail/MailSession settings
vi /usr/local/tomcat/conf/Catalina/localhost/liferay.xml
<parameter>
       <name>mail.smtp.host</name>
       <value>localhost</value>
</parameter>
<parameter>
       <name>mail.imap.host</name>
       <value>localhost</value>
</parameter>
<parameter>
       <name>mail.store.protocol</name>
       <value>imap</value>
</parameter>
<parameter>
       <name>mail.transport.protocol</name>
       <value>smtp</value>
</parameter>
<parameter>
       <name>mail.pop3.host</name>
       <value>localhost</value>
</parameter>







# Enable autostart on reboots

chkconfig postfix on
chkconfig dovecot on


# Verify Install Commands

tail -f 50 /var/log/maillog
tail -f 50 /var/log/messages



# Restart saslauthd before Postfix, so that Postfix doesn't start with
# a bad SASL setup, otherwise it doesn't answer smtp requests
/etc/init.d/saslauthd restart

# make sure saslauthd restarts
ps -ef | grep saslauthd | grep -v grep



# make sure postfix restarts
/etc/init.d/postfix restart
ps -ef | grep postfix | grep -v grep


# make sure dovecot restarts
/etc/init.d/dovecot restart
ps -ef | grep dovecot | grep -v grep


reboot


# make sure everything starts
ps -ef | grep postfix   | grep -v grep
ps -ef | grep dovecot   | grep -v grep
ps -ef | grep saslauthd | grep -v grep




# Test SMTP by sending an email to LIFERAYUSR@EMAILDOMAIN

telnet localhost 25
EHLO EMAILDOMAIN
MAIL FROM:test@test.com
RCPT TO:LIFERAYUSR@EMAILDOMAIN
DATA
Test msg
.

quit



# Test SMTP by sending an email to alias LIFERAYLOGIN

telnet localhost 25
EHLO EMAILDOMAIN
MAIL FROM:test@test.com
RCPT TO:LIFERAYLOGIN
DATA
Test msg
.

quit




#TEST IMAP by logging in as LIFERAYUSR@EMAILDOMAIN

telnet localhost imap
x LOGIN LIFERAYUSR@EMAILDOMAIN LIFERAYPWD
x STATUS "INBOX" (MESSAGES)
x SELECT "INBOX"
x FETCH 1 BODY[HEADER]
x LOGOUT

# Test using usedId without a Domain name
telnet localhost imap
x LOGIN LIFERAYUSR LIFERAYPWD
x STATUS "INBOX" (MESSAGES)
x SELECT "INBOX"
x FETCH 1 BODY[HEADER]
x LOGOUT

3.4. Microsoft Exchange

Coming soon...

Chapter 4. LDAP Integration

In this chapter you will learn about LDAP integration. The initial set of instructions will guide you through the installation of the Apache directory server and an LDAP browser. The instructions will then guide you to input a user into the LDAP browser. After the user has been entered into the browser the user will be integrated with Liferay Portal.

1. Installing Apache Directory Server

  1. Go to www.apache.org.

  2. Click Directory.

  3. Click Download.

  4. Click on the suggested mirror site for download.

  5. Click apacheds>stable>1.0>1.0 RC3>apacheds-1.0-RC3-win32-setup.exe

  6. Save file.

  7. Click on the Apache icon and follow the installation instructions.

  8. Click Start.

2. Installing LDAP Browser

  1. Go to www.jxplorer.org.

  2. Click Downloads>precompiled java package>Windows platform.

  3. Save file.

  4. Click on the LDAP browser icon and follow the installation instructions.

3. Inputting User in LDAP Browser

  1. Open the LDAP browser.

  2. Click File>Connect.

  3. Change the port to 10389.

  4. In the Level drop-down menu, choose User+Password.

  5. Insert uid=admin,ou=system in the User DN input field.

  6. The password is secret.

  7. Click Save and enter a name for the template.

  8. Right click on Example and click New.

  9. Add inetorgperson to the Selected Class.

  10. User Jane Smith will be added. Enter cn=janesmith in the Enter RDN field and click OK.

  11. In the Table Editor enter Smith in the SN line.

  12. Enter Jane in the givenName line.

  13. For the mail enter janesmith@liferay.com.

  14. For the userpassword enter test.

  15. Click Submit.

4. Integration

  1. With user Jane Smith entered into the LDAP browser, the user will now be integrated with Liferay Portal. Begin by logging into Liferay Portal as the Administrator.

  2. The login is test@liferay.com and the password is test.

  3. Currently, Jane Smith’s profile exists only on the LDAP browser. To integrate her information into Liferay Portal, click on the Users tab in the Admin portlet.

  4. Click Authentication.

  5. Click LDAP.

  6. Check the Enabled box.

  7. If the Required box is checked only users in the LDAP server will be able to log into Liferay Portal. For this demonstration leave the box unchecked.

  8. Liferay Portal supports other directory servers in addition to the ones provided. The Apache Directory Server, Microsoft Active Directory Server, and Novell eDirectory comes prepackaged.

  9. Select the Apache Directory Server and click Save.

  10. Once Jane Smith logs in to her account on Liferay Portal and agrees to the terms of use, her user information will be added to Liferay Portal. To demonstrate this, assume that Jane Smith has logged into her account. While logged in as the Administrator, a search for Jane Smith will show that the user has been integrated into Liferay Portal.

Chapter 5. Upgrade notes

Table of Contents

1. Portlet and theme ids

1. Portlet and theme ids

Since Liferay Portal v4.1.2 the ids of portlets and themes are manipulated before writting them to the database. In particular all characters that are not safe to be used in JavaScript scripts (spaces and minus signs) are removed. Liferay 4.1.3 and Liferay 4.2.0 include an upgrade script that modifies the database to mantain change any old portlet or theme reference to conform to the new naming convention.

While the upgrade script should cover 99% of the situations there is a 1% that is not covered and you should be aware of. If you are using custom layout templates that define columns whose names are not of the form column-N where N is a number from 1 to 10 then you should upgrade the portlets referenced from those columns yourself.

In order to do so review the typePreferences of entries of the Layout_ table that use the non-conforming layout template and edit it's contents. You should keep the properties-like format and only change the portlet ids to remove the spaces and minus signs in the cases where they are used.

Chapter 6. Conclusion

This guide has explained how to install and configure Liferay Portal for all the supported applications servers and databases.

Note that for a production environment you'll need to do some extra fine tunning operations. If you need help you can use the community support or the professional support services referred to in the prefece of the document.