Liferay的安装与配置
来自站长百科
导航:上一页
运行环境[ ]
安装Liferay[ ]
- 解压缩liferay-portal到TOMCAT目录下并改名为 liferay ,然后将 liferay/WEB-INF/lib下除util-taglib.jar 外的其他 jar 包剪切到 TOMCAT/common/lib/ext 下
- 在TOMCAT/conf/Catalina/localhost 目录下,删除该目录下已有的文件,然后新建 ROOT.xml 文件(这里的 ROOT 必须是大写)
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 " /> Context >
- 在TOMCAT/conf目录下,新建jaas.config文件
jaas.config :
PortalRealm { com.liferay.portal.security.jaas.PortalLoginModule required; };
- 修改 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
- 修改 TOMCAT/bin 目录下 catalina.bat 文件,增加下面内容:
rem ----- Execute The Requested Command --------------------------------------- <o:p> </o:p> set JAVA_OPTS=-Xms<st1:chmetcnv tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="128" unitname="m" w:st="on">128m</st1:chmetcnv> -Xmx<st1:chmetcnv tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="512" unitname="m" w:st="on">512m</st1:chmetcnv> -Dfile.encoding=UTF8 -Duser.timezone=GMT+08 -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config
- 到 TOMCAT/bin 目录下,运行 startup.bat 。在浏览器中输入 http://localhost:8080 ,将会看见 portal 首页。
连接数据库[ ]
连接 HSQLDB[ ]
- 修改TOMCAT/conf/Catalina/localhost/ROOT.xml 文件并将 SQL SERVER 驱动包 hsql.jar 拷贝到 TOMCAT/common/lib/ext 下
<resource></resource> name="jdbc/LiferayPool" auth="Container" type="javax.sql.DataSource" driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:test" username="sa" password="" maxActive="20" />
连接 S6QL SERVER[ ]
修改TOMCAT/conf/Catalina/localhost/ROOT.xml 文件并将 SQL SERVER 驱动包 jtds-1.2.jar 拷贝到 TOMCAT/common/lib/ext 下
<resource></resource> name="jdbc/LiferayPool" auth="Container" type="javax.sql.DataSource" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://localhost:1433;DatabaseName=lportal4" username="sa" password="sa" maxActive="100" />