Install lifeRay 4.2.1 as a sub-context web application
- Download and install Tomcat
- Download and install Java
- Download MySQL from www.mysql.com and install.
- Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Tomcat.
- Download mysql-connector-java-{$version}-bin.jar. (This is the JDBC connector for MySQL, for other databases, go to appropriate website to download.)
- Copy to $TOMCAT_HOME/common/lib/ext.
- Populate your database with the portal schema and default data.
- Download script create-mysql.sql from Liferay Portal 4.2.0 SQL Scripts.
- In command prompt, run mysql script by entering mysql < create-mysql.sql
<!--more-->
- Download Liferay’s Portal 4.2.0 Dependencies.
- Create a $TOMCAT_HOME/common/lib/ext directory and unzip the dependencies ZIP in there. If the files do not extract to this directory, make sure they are in the correct directory by moving them there.
- Edit $TOMCAT_HOME/conf/catalina.properties.
common.loader=
${catalina.home}/common/classes,\
...\
${catalina.home}/common/lib/ext/*.jar
- For supporting UTF-8 UIRIEncoding, edit $TOMCAT_HOME/conf/server.xml.
<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
- Create and edit $TOMCAT_HOME/conf/Catalina/localhost/lifeRay.xml to set up the portal web application.
lifeRay.xml:
<Context crossContext="true" path="/lifeRay">
<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/lportal"
username="root"
password="****"
maxActive="20"
/>
<Resource
name="mail/MailSession"
auth="Container"
type="javax.mail.Session"
mail.imap.host="localhost"
mail.pop3.host="localhost"
mail.smtp.host="localhost"
mail.store.protocol="imap"
mail.transport.protocol="smtp"
/>
<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>
- Download liferay-portal-tomcat-jdk5-4.2.1.zip, upzip to c:/temp, rename folder c:/temp/ liferay-portal-tomcat-jdk5-4.2.1\webapps\ROOT to c:/temp/ liferay-portal-tomcat-jdk5-4.2.1\webapps\lifeRay, and then move lifeRay to $TOMCAT_HOME/webapps/
- Modify $TOMCAT_HOME/webapps/lifeRay/index.html to route to ā/lifeRay/cā:
...
<meta content="0; url=/lifeRay/c" http-equiv="refresh">
...
<body onLoad="javascript:location.replace('/lifeRay/c')">
...
- Modify Tomcat_root/webapps/lifeRay/WEB-INF/classes/portal-ext.properties:
... portal.ctx=/lifeRay ...
- Modify Tomcat_root/webapps/lifeRay/WEB-INF/web.xml.
<context-param> <param-name>root_path</param-name> <param-value>/lifeRay</param-value> </context-param>
- Restart tomcat.