Junky's IT Notebook

          統(tǒng)計(jì)

          留言簿(8)

          積分與排名

          WebSphere Studio

          閱讀排行榜

          評(píng)論排行榜

          Tomcat下配置liferay portal (專業(yè)配置)

          1. 下載安裝JDK 1.4.2。設(shè)置環(huán)境變量命名為%JAVA_HOME% 并讓它指向你的目錄。
          2. 下載安裝Tomcat5.0.x
          3. 創(chuàng)建 /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. 創(chuàng)建/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. 創(chuàng)建/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:創(chuàng)建到%CATALINA_HOME%/liferay目錄地下(%CATALINA_HOME%為任意目錄,最好不帶中文)
          10. 移動(dòng)%CATALINA_HOME%/liferay/WEB-INF/lib 下除util-taglib.jar之外的所有.jar包放入/common/lib/ext。
          11. 啟動(dòng)Tomcat,在瀏覽器地址欄上輸入
          http://localhost就能看見登錄界面,用戶名輸入:test@liferay.com,密碼:test.

          疑難:
          1. 此方法只適應(yīng)Tomcat5.0.x 和 jdk1.4.2,其他版本搭配,并不一定使用;
          2. liferay-portal-pro-3.6.1.war用WinRAR解壓即可;
          3. 在安裝Tomcat時(shí)應(yīng)注意,不要讓別的程序占用了8080端口,如果占用,可以在安裝的時(shí)候修改端口,也可以修改
          /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.安裝完畢,打開地址時(shí)可能報(bào) java.lang.OutOfMemoryError,設(shè)置JVM的內(nèi)存為-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.

          posted on 2007-05-28 10:00 junky 閱讀(1555) 評(píng)論(0)  編輯  收藏 所屬分類: portal

          主站蜘蛛池模板: 施秉县| 微山县| 得荣县| 南康市| 常州市| 金昌市| 贞丰县| 原阳县| 佛教| 沅陵县| 万全县| 通化市| 东乌珠穆沁旗| 永德县| 通渭县| 磴口县| 准格尔旗| 黑河市| 三门县| 上虞市| 南和县| 东乡族自治县| 嘉义市| 荆门市| 泉州市| 灵武市| 武隆县| 广饶县| 鄯善县| 宜黄县| 佛坪县| 金川县| 牙克石市| 武鸣县| 油尖旺区| 克东县| 荣昌县| 德昌县| 军事| 游戏| 孟村|