Download and install Tomcat 5.5.17 into your preferred directory. From now on, the directory where you installed Tomcat will be referred to as $TOMCAT_HOME.
Download and install JDK 5 . Set an environment variable called %JAVA_HOME% to point to your JDK directory.
Note: If you are using JDK 1.4, you must download and install the JDK 1.4 Compatability Package at tomcat.apache. For JDK 1.4 users: delete $TOMCAT_HOME/webapps/ROOT/WEB-INF/lib/xercesImpl.jar
. For JDK 5 users: move $TOMCAT_HOME/webapps/ROOT/WEB-INF/lib/xercesImpl.jar
to TOMCAT_HOME/common/endorsed.
Download MySQL from www.mysql.com and install.
Create and edit $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml
to set up the portal web application.
<Context path=""> </Context>
Download liferay-portal-pro-4.x.war.
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.
Edit $TOMCAT_HOME/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.
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
.
Edit $TOMCAT_HOME/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&characterEncoding=UTF-8" username="" password="" maxActive="100" maxIdle="30" maxWait="10000" /> </Context>
Populate your database with the portal schema and default data.
Download script create-mysql.sql from Liferay Portal 4.x SQL Scripts.
In command prompt, run mysql script by entering mysql < create-mysql.sql
Create a mail session bound to mail/MailSession.
Edit $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml
and configure a mail session.
<Context...> <Resource name="mail/MailSession" auth="Container" type="javax.mail.Session" mail.transport.protocol="smtp" mail.smtp.host="localhost" /> </Context>
Configure JAAS.
Edit $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml
and configure a security realm.
<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 $TOMCAT_HOME/conf/Catalina/localhost/tunnel.xml
if you want to enable Liferay's HTTP tunneling.
Create $TOMCAT_HOME/conf/jaas.config
.
PortalRealm { com.liferay.portal.kernel.security.jaas.PortalLoginModule required; };
Edit $TOMCAT_HOME/bin/catalina.bat
so that Tomcat can reference the login module.
rem ----- Execute... set JAVA_OPTS=-Xms128m -Xmx512m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config
Delete contents $TOMCAT_HOME/webapps/ROOT directory
.
Unpack liferay-portal-pro-4.x.war to $TOMCAT_HOME/webapps/ROOT
.
For supporting UTF-8 UIRIEncoding, edit $TOMCAT_HOME/conf/server.xml
.
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />
Run Tomcat, point browser to http://localhost:8080. Sign in as test@liferay.com and password test