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

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

1.3. GlassFish

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

1.4. JBoss+Jetty 4.0.2

1.4.1. Easy

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

  • Download liferay-portal-ent-4.0.0-jboss-jetty.zip.

  • Unzip liferay-portal-ent-4.0.0-jboss-jetty.zip to C:\LIFERAY (or any another directory). Be sure to unzip with folder names.

  • Execute C:\LIFERAY\bin\run.bat to run the database and web server. Make sure there isn't another application already using port 8080.

    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.

  • 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.4.2. Expert

  • 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

1.5.1. Easy

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

  • Download liferay-portal-ent-4.0.0-jboss-tomcat.zip.

  • Unzip liferay-portal-ent-4.0.0-jboss-tomcat.zip to C:\LIFERAY (or any another directory). Be sure to unzip with folder names.

  • Execute C:\LIFERAY\bin\run.bat to run the database and web server. Make sure that there isn't another application using port 8080.

    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.

  • 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.2. Expert

  • 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

1.6.1. Easy

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

  • Download liferay-portal-pro-4.0.0-jetty.zip.

  • Unzip liferay-portal-pro-4.0.0-jetty.zip to C:\LIFERAY (or any another directory). Be sure to unzip with folder names.

  • Execute C:\LIFERAY\bin\run.bat to run the database and web server. Make sure there isn't another application using port 8080.

    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.

  • 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.6.2. Expert

  • 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

1.8.1. Easy

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

  • Download liferay-portal-ent-4.0.0-jonas-jetty.zip.

  • Unzip liferay-portal-ent-4.0.0-jonas-jetty.zip to C:\LIFERAY (or any another directory). Be sure to unzip with folder names.

  • Set an environment variable called %JONAS_ROOT% to point to where you unzipped liferay-portal-ent-4.0.0-jonas-jetty.zip.

  • Execute C:\LIFERAY\bin\nt\jonas.bat to run the database and web server. Make sure there isn't another application using port 8080.

    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.

  • 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.8.2. Expert

  • 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

1.9.1. Easy

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

  • Download liferay-portal-ent-4.0.0-jonas-tomcat.zip.

  • Unzip liferay-portal-ent-4.0.0-jonas-tomcat.zip to C:\LIFERAY (or any another directory). Be sure to unzip with folder names.

  • Set an environment variable called %JONAS_ROOT% to point to where you unzipped liferay-portal-ent-4.0.0-jonas-tomcat.zip.

  • Execute C:\LIFERAY\bin\nt\jonas.bat to run the database and web server. Make sure there isn't another application using port 8080.

    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.

  • 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.2. Expert

  • 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

    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

1.14.1. Easy

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

  • Download liferay-portal-pro-4.0.0-resin.zip.

  • Unzip liferay-portal-pro-4.0.0-resin.zip to C:\LIFERAY (or any another directory). Be sure to unzip with folder names.

  • Execute C:\LIFERAY\bin\run.bat to run the database and web server. Make sure that there isn't another application already using port 8080.

    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.

  • 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.2. Expert

  • 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

1.17.1. Easy

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

  • Download liferay-portal-pro-4.0.0-tomcat.zip.

  • Unzip liferay-portal-pro-4.0.0-tomcat.zip to C:\LIFERAY (or any another directory). Be sure to unzip with folder names.

  • Execute C:\LIFERAY\bin\startup.bat to run the database and web server. Make sure that there isn't another application already using port 8080.

    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.

  • 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.2. Expert

  • 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.