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

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

          準備工作:

          1、 安裝JDK 1.5或以上版本,設置好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、 啟動Eclipse,通過點擊Help菜單中的Software Updates...啟動Software Updates向?qū)Ы缑妫陆?/span>subclipse遠程站點,遠程下載地址為http://subclipse.tigris.org/update_1.0.x,勾選下載安裝Subclipse Plugin后點擊Intasll按鈕安裝

              Subclipse Plugin安裝

          檢出代碼:

          1、 在新建向?qū)υ捒蛑羞x擇從SVN中檢出項目
          SVN檢出項目

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

          3、 選擇文件夾"branches"release4.0后點擊Finish

              選擇SVN檢出文件夾


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

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

          mysql> create database ofbiz;

                 mysql> exit

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

          將其中的<delegator name="default"...> 段中的"datasource-name"從原來的"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)初始化

          在命令行窗口下,進入ofbiz根目錄后運行

          ant run-install

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


          啟動
          ofbiz:

          有兩種方式可以啟動ofbiz

          1、 雙擊根目錄下的startofbiz.bat啟動

          2、 eclipse中用鼠標右鍵點擊build.xml,在右鍵菜單中選擇Run As->Ant Build…在彈出的構建對話框中targets選項卡中勾選run后點擊run

              OFBiz ANT運行配置界面

          訪問
          ofbiz:

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

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

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

          Feedback

          # re: 安裝OFBiz 4.0開發(fā)環(huán)境 2008-10-21 15:33 laiahu
          謝謝,寫得不錯,很詳細!  回復  更多評論
            

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

          主站蜘蛛池模板: 安康市| 广丰县| 慈溪市| 通城县| 河间市| 五莲县| 信阳市| 灌阳县| 芒康县| 锦屏县| 南安市| 正阳县| 尚志市| 南华县| 余姚市| 靖远县| 育儿| 婺源县| 唐海县| 武隆县| 明星| 望奎县| 洛宁县| 巫溪县| 时尚| 襄垣县| 黄浦区| 开封县| 荆门市| 昌宁县| 黄平县| 西昌市| 乌苏市| 沙雅县| 兰坪| 夹江县| 吉安县| 秦皇岛市| 昌平区| 靖西县| 南安市|