引用
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]
运维网声明
1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网 享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com