Junky's IT Notebook

          統計

          留言簿(8)

          積分與排名

          WebSphere Studio

          閱讀排行榜

          評論排行榜

          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.

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

          主站蜘蛛池模板: 龙里县| 陇南市| 陇川县| 鄂托克旗| 禄丰县| 龙游县| 美姑县| 越西县| 旬阳县| 苍梧县| 鄂州市| 海城市| 金塔县| 双桥区| 漳平市| 都兰县| 阜阳市| 莫力| 平潭县| 和政县| 宁波市| 澄迈县| 阿巴嘎旗| 巴青县| 滦南县| 松滋市| 永靖县| 太仆寺旗| 高唐县| 德昌县| 吉隆县| 宁蒗| 深水埗区| 元氏县| 阿鲁科尔沁旗| 日照市| 邳州市| 河西区| 延安市| 鹤壁市| 潜山县|