spark的自留地(ofbiz/eclipse rcp/shark/opentaps)

            BlogJava :: 首頁(yè) :: 聯(lián)系 :: 聚合  :: 管理
            54 Posts :: 0 Stories :: 112 Comments :: 0 Trackbacks
           

          準(zhǔn)備工作:

          1、 安裝JDK 1.5或以上版本,設(shè)置好JAVA_HOME

          2、 安裝MySQL 5.0或以上版本

          3、 http://www.eclipse.org/downloads/下載最新Eclipse版本,我下的是3.4.1版的Eclipse IDE for Java EE Developers,并解壓至工作目錄(我解壓至"C:\\",即工作目錄為"C:\\eclipse"

          4、 啟動(dòng)Eclipse,通過(guò)點(diǎn)擊Help菜單中的Software Updates...啟動(dòng)Software Updates向?qū)Ы缑妫陆?/span>subclipse遠(yuǎn)程站點(diǎn),遠(yuǎn)程下載地址為http://subclipse.tigris.org/update_1.0.x,勾選下載安裝Subclipse Plugin后點(diǎn)擊Intasll按鈕安裝

              Subclipse Plugin安裝

          檢出代碼:

          1、 在新建向?qū)?duì)話框中選擇從SVN中檢出項(xiàng)目
          SVN檢出項(xiàng)目

          2、 SVN檢出位置URL框中輸入:http://svn.apache.org/repos/asf/ofbiz后點(diǎn)擊Next
          檢查ofbiz代碼

          3、 選擇文件夾"branches"release4.0后點(diǎn)擊Finish

              選擇SVN檢出文件夾


          數(shù)據(jù)庫(kù)配置 [可以參考我寫(xiě)的
          opentaps 1.0.2安裝(mysql)一文]:

          1、 通過(guò)mysql命令行來(lái)創(chuàng)建obfiz運(yùn)行所需數(shù)據(jù)庫(kù),為了方便識(shí)別,我們這里就用ofbiz來(lái)做數(shù)據(jù)庫(kù)吧。

          mysql> create database ofbiz;

                 mysql> exit

          2、 編輯ofbiz目錄中的framework/entity/config/entityengine.xml文件,使其能正確連接到你的mysql數(shù)據(jù)庫(kù)中(注意其中的ofbiz-userofbiz-password,把它們改成你實(shí)際的數(shù)據(jù)庫(kù)連接用戶名與密碼)。

          將其中的<delegator name="default"...> 段中的"datasource-name"從原來(lái)的"local" 改為 "localmysql"

          編輯<datasource name="localmysql"...> 段內(nèi)容,修改"jdbc-uri""jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true";修改"jdbc-username"/ "jdbc-password"為你的mysql連接用戶名/密碼,修改character-set="gbk"collate="gbk_bin",示例如下:

           

           1 <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
           2
           3        <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
           4
           5    </delegator>
           6
           7    <delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
           8
           9        <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
          10
          11    </delegator>
          12
          13    <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
          14
          15        <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
          16
          17    </delegator>
          18
          19    <delegator name="other" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
          20
          21        <group-map group-name="org.ofbiz" datasource-name="localmysql"/>        
          22
          23   </delegator>
          24
          25
          26
          27


           

           1<datasource name="localmysql"
           2
           3            helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
           4
           5            field-type-name="mysql"
           6
           7            check-on-start="true"
           8
           9            add-missing-on-start="true"
          10
          11            check-pks-on-start="false"
          12
          13            use-foreign-keys="true"
          14
          15            join-style="ansi-no-parenthesis"
          16
          17            alias-view-columns="false"
          18
          19            drop-fk-use-foreign-key-keyword="true"
          20
          21            table-type="InnoDB"
          22
          23            character-set="gbk"
          24
          25            collate="gbk_bin">
          26
          27        <read-data reader-name="seed"/>
          28
          29        <read-data reader-name="demo"/>
          30
          31        <read-data reader-name="ext"/>
          32
          33        <inline-jdbc
          34
          35                jdbc-driver="com.mysql.jdbc.Driver"
          36
          37                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"
          38
          39                jdbc-username="ofbiz-user"
          40
          41                jdbc-password="ofbiz-password"
          42
          43                isolation-level="ReadCommitted"
          44
          45                pool-minsize="2"
          46
          47                pool-maxsize="20"/>
          48
          49



             3、 系統(tǒng)初始化

          在命令行窗口下,進(jìn)入ofbiz根目錄后運(yùn)行

          ant run-install

          系統(tǒng)開(kāi)始安裝,等大約15-30分鐘后,系統(tǒng)提示安裝完成。


          啟動(dòng)
          ofbiz:

          有兩種方式可以啟動(dòng)ofbiz

          1、 雙擊根目錄下的startofbiz.bat啟動(dòng)

          2、 eclipse中用鼠標(biāo)右鍵點(diǎn)擊build.xml,在右鍵菜單中選擇Run As->Ant Build…在彈出的構(gòu)建對(duì)話框中targets選項(xiàng)卡中勾選run后點(diǎn)擊run

              OFBiz ANT運(yùn)行配置界面

          訪問(wèn)
          ofbiz:

          打開(kāi)瀏覽器訪問(wèn):https://localhost:8443/webtools/control/main點(diǎn)擊屏幕右方的Login鏈接后進(jìn)行登錄,登錄后就可以訪問(wèn)你希望的功能特性,系統(tǒng)默認(rèn)帳號(hào)為admin/ofbiz,擁有所有權(quán)限。
              OFBiz主界面

          本人原創(chuàng)文章,歡迎轉(zhuǎn)載,轉(zhuǎn)載請(qǐng)注明出處!

          posted on 2008-10-07 12:55 shanghai_spark 閱讀(2799) 評(píng)論(2)  編輯  收藏 所屬分類: opentaps

          Feedback

          # re: 安裝OFBiz 4.0開(kāi)發(fā)環(huán)境 2008-10-21 15:33 laiahu
          謝謝,寫(xiě)得不錯(cuò),很詳細(xì)!  回復(fù)  更多評(píng)論
            

          # re: 安裝OFBiz 4.0開(kāi)發(fā)環(huán)境[未登錄](méi) 2009-01-16 15:23 coder
          謝謝你,第一天上班就要學(xué)習(xí)ofbiz作項(xiàng)目,搜遍百度資料寥寥無(wú)幾,你那還有ofbiz的資料嗎?最好是講xml中標(biāo)簽的。。給我提供一點(diǎn)。
          我的msn:zj13972235182@163.com  回復(fù)  更多評(píng)論
            

          主站蜘蛛池模板: 宁河县| 宁波市| 雷波县| 肥东县| 平谷区| 杂多县| 台州市| 肥城市| 墨玉县| 巴林右旗| 昭觉县| 秦皇岛市| 噶尔县| 定西市| 山东| 西华县| 兴宁市| 兴安县| 德江县| 阳春市| 泰和县| 瑞安市| 博客| 万山特区| 武陟县| 荆州市| 虎林市| 壤塘县| 林州市| 九台市| 雅江县| 文安县| 临桂县| 台南县| 宁强县| 贵德县| 双鸭山市| 安化县| 晋宁县| 志丹县| 金平|