Tomcat下安装liferay(专业版)

[quote]Tomcat下安装liferay(专业版)

在 Tomcat下配置liferay portal (专业配置)
1. 下载安装JDK 1.4.2。设置环境变量命名为%JAVA_HOME% 并让它指向你的目录。
2. 下载安装Tomcat5.0.x
3. 创建 /conf/Catalina/localhost/liferay.xml
<Context path="" docBase="../liferay" debug="0" reloadable="true" crossContext="true">
<Resource name="jdbc/LiferayPool" auth="Container" type="javax.sql.DataSource" />
<ResourceParams name="jdbc/LiferayPool">
<parameter>
<name>driverClassName</name>
<value>org.hsqldb.jdbcDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:hsqldb:test</value>
</parameter>
<parameter>
<name>username</name>
<value>sa</value>
</parameter>
<parameter>
<name>password</name>
<value></value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
</ResourceParams>
<Resource name="mail/MailSession" auth="Container" type="javax.mail.Session" />
<ResourceParams name="mail/MailSession">
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
<Realm
className="org.apache.catalina.realm.JAASRealm"
appName="PortalRealm"
userClassNames="com.liferay.portal.jaas.PortalPrincipal"
roleClassNames="com.liferay.portal.jaas.PortalRole"
debug="99"
useContextClassLoader="false"
/>
</Context>
4. 下载 liferay-portal-pro-3.6.1.war。
5. 编辑 /conf/catalina.properties。
common.loader=
${catalina.home}/common/classes,\
...\在这段最后加入
${catalina.home}/common/lib/ext/*.jar
6. 创建/conf/Catalina/localhost/tunnel.xml。
<Context path="/tunnel">
<Realm
className="org.apache.catalina.realm.JAASRealm"
appName="PortalRealm"
userClassNames="com.liferay.portal.jaas.PortalPrincipal"
roleClassNames="com.liferay.portal.jaas.PortalRole"
debug="99"
useContextClassLoader="false"
/>
</Context>
7. 创建/conf/jaas.config。
PortalRealm {
com.liferay.portal.jaas.PortalLoginModule required;};
8. 编辑/bin/catalina.bat
在rem ----- Execute...中加入:

set JAVA_OPTS=%JAVA_OPTS% -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config
9. 解压liferay-portal-pro-3.6.1.war:创建到%CATALINA_HOME%/liferay目录地下(%CATALINA_HOME%为任意目录,最好不带中文)
10. 移动%CATALINA_HOME%/liferay/WEB-INF/lib 下除util-taglib.jar之外的所有.jar包放入/common/lib/ext。
11. 启动Tomcat,在浏览器地址栏上输入http://localhost就能看见登录界面,用户名输入:test@liferay.com,密码:test.

疑难:
1. 此方法只适应Tomcat5.0.x 和 jdk1.4.2,其他版本搭配,并不一定使用;
2. liferay-portal-pro-3.6.1.war用WinRAR解压即可;
3. 在安装Tomcat时应注意,不要让别的程序占用了8080端口,如果占用,可以在安装的时候修改端口,也可以修改
/conf/server.xml,使port="8082"或其他端口。
<Connector
port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
4.安装完毕,打开地址时可能报 java.lang.OutOfMemoryError,设置JVM的内存为-Xmx512m。
附原安装文件:

Tomcat 5.0.x/5.5.x

Expert


Download and install JDK 1.4.2 . Set an environment variable

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-3.6.1.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.jaas.PortalPrincipal"
roleClassNames="com.liferay.portal.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.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-3.6.1.war.


Unpack liferay-portal-pro-3.6.1.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. 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.


[size=medium][/size][/quote]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值