Linux下要使用liferay war包和原装tomcat服务器,需要我们自己手动作如下配置:
1)删除TOMCAT/conf/Catalina/localhost 目录,新建 ROOT.xml 文件。内容:
< Context path = "" docBase = " ../liferay " debug = " 0 " reloadable = " true " crossContext = " true " >
< Resource name = " jdbc/LiferayPool " auth = " Container " type = " javax.sql.DataSource "
driverClassName = "org.hsqldb.jdbcDriver " url = " jdbc:hsqldb:test " username = " sa " password = "" maxActive = " 20" />
< 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 " />
<!--</span--> Context >
2)在TOMCAT/conf目录下,新建jaas.config文件。内容:
PortalRealm {
com.liferay.portal.security.jaas.PortalLoginModule required;
};
3)TOMCAT/conf 目录下 catalina.properties 文件中的下面一段:
common.loader=${catalina.home}/common/classes,${catalina.home}/common/i18n/*.jar,${catalina.home}/common/endorsed/*.jar,${catalina.home}/common/lib/*.jar,${catalina.home}/common/lib/ext/*.jar
4)修改 TOMCAT/bin 目录下 catalina.bat 文件,增加下面内容:
rem ----- Execute The Requested Command ---------------------------------------
set JAVA_OPTS=-Xms128m -Xmx512m -Dfile.encoding=UTF8 -Duser.timezone=GMT+08 -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config
重起运行portal 首页。