5-Oct-06 (Created: 5-Oct-06) | More in 'Drupal'

liferay installation instructions: mahaveer

1. Download and install JDK 5. Set environment variable call JAVA_HOME to point to JDK directory.

2. Download and install Tomcat 5.5.x.

For JDK 5 users: move $TOMCAT_HOME/webapps/ROOT/WEB-INF/lib/xercesImpl.jar to TOMCAT_HOME/common/endorsed.

3. Download and install MySQL.

4. Stop tomcat if it is running

5. Download liferay-portal-pro-4.x.war.

6. Download portlet.jar and portal-kernel.jar from liferay Portal 4.x Dependencies.

Create a $TOMCAT_HOME/common/lib/ext directory and copy these two files there. If the files do not extract to this directory, make sure they are in the correct directory by moving them there.

7. Edit $TOMCAT_HOME/conf/catalina.properties.

common.loader=
    ${catalina.home}/common/classes,\
    ...\
    ${catalina.home}/common/lib/ext/*.jar

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

1. Download mysql-connector-java-{$version}-bin.jar. (This is the JDBC connector for MySQL, for other databases, go to appropriate website to download.)

2. Copy to $TOMCAT_HOME/common/lib/ext.

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

   1. Download script create-mysql.sql from Liferay Portal 4.x SQL Scripts.
   2. In command prompt, run mysql script by entering mysql < create-mysql.sql

10. Create $TOMCAT_HOME/conf/jaas.config.

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

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

rem ----- Execute...

set JAVA_OPTS=-Xms128m -Xmx512m -Dfile.encoding=?UTF8? -Djava.security.auth.login.config=?%CATALINA_HOME%/conf/jaas.config?

In case you do not have Catalina.bat since you have installed tomcat as service. Right click on tomcat/bin/tomcat5w.exe and select Open. In ?Java Options:? add these 2 lines in separate lines

-Dfile.encoding=?UTF8?  
-Djava.security.auth.login.config=?%CATALINA_HOME%/conf/jaas.config?

Note: %CATALINA_HOME% for services is not identified when the server is started. You may have to replace %CATALINA_HOME% with the actual path of Tomcat.

12. Unpack liferay-portal-pro-4.x.war to $TOMCAT_HOME/webapps/liferay

12a. Create a file portal-ext.properties in $TOMCAT_HOME/webapps/liferay/WEB-INF/classes/

portal.release=professional

portal.ctx=/liferay

12b. In liferay/WEB-INF/web.xml change root_path from

	<context-param>
		<param-name>root_path</param-name>
		<param-value></param-value>
	</context-param>

To 
	<context-param>
		<param-name>root_path</param-name>
		<param-value>/liferay</param-value>
	</context-param>

12c. In liferay/index.html change '/c' to '/liferay/c'

12d. Download xalan.jar file and place it in liferay/WEB-INF/lib folder.

13. Add a new context in tomcat's server.xml. Copy the complete section below and change the docbase to point to liferay directory. Change the password for JBDC connection to the DB.

<Context path="/liferay" docBase="C:\Tomcat 5.5\webapps\liferay" debug="0" reloadable="true" crossContext="true">
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="org.gjt.mm.mysql.Driver"
        url="jdbc:mysql://localhost:3306/lportal?useUnicode=true&characterEncoding=UTF-8"
        username="root"
        password="XXXX"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
    />
	<Resource
		name="mail/MailSession"
		auth="Container"
		type="javax.mail.Session"
		mail.transport.protocol="smtp"
		mail.smtp.host="localhost"
	/>
	<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>

14. Run Tomcat, point browser to http://localhost:8080/liferay. Sign in as [email protected] and password test