opentaps 1.0.2安裝(mysql)

opentaps是一個基於ofbiz基礎開發的完全開源的企業級應用系統。它包括了完整的ERP和CRM解決方案和內建的企業智能工具。

opentaps現在在國內應用面不象sugarcrm/vtigercrm這些企業應用那樣普遍,我想很大程度是由於JavaEE應用的邏輯結構嚴謹與複雜度決定其不象PHP應用那樣容易拆分按需閱讀切入。瞭解一個JavaEE的應用需要先了解其構造的框圖、分層結構、每層實現的技術方式以及採用的技術。對於OFBiz這樣一個野心極大要囊括幾乎所有企業應用層面的項目,想要掌握它就更難上加難了,也許我們可以選擇簡單開始,先從文檔的中文化與由簡入繁的練習中開始瞭解這個龐大的開源項目。


閒話少說,我們先從opentaps的安裝開始,讓我們能夠在自己的機器上跑起opentaps開始,也許你一直在尋找的企業應用已經全部在此嘍!

準備工作:
1、安裝JDK 1.5或以上版本,並在系統中設置好JAVA_HOME及相關PATH
2、安裝MYSQL 5.0或以上版本
3、安裝ANT1.7或以上版本,並在系統中設置好ANT_HOME及相關PATH
4、從以下地址下載opentaps 1.0.2二進制版本
[url]http://nchc.dl.sourceforge.net/sourceforge/opentaps/opentaps-1.0.2-all-platforms.zip[/url]

開始安裝:
1、通過mysql命令行來創建opentaps所需數據庫,爲了方便識別,我們這裏就用opentaps來做數據庫吧。
mysql> create database opentaps;

2、將下載的opentaps-1.0.2-all-platforms.zip解壓至你的工作目錄。

3、編輯opentaps目錄中的framework/entity/config/entityengine.xml文件,使其能正確連接到你的mysql數據庫中。
3.1 將其中的<delegator name="default"...> 段中的"datasource-name"從原來的"local" 改爲 "localmysql"
3.2 編輯<datasource name="localmysql"...> 段內容,修改"jdbc-uri"爲"jdbc:mysql://127.0.0.1/opentaps?autoReconnect=true";修改"jdbc-username"/ "jdbc-password"爲你的mysql連接用戶名/密碼,修改character-set="gbk",collate="gbk_bin"
示例如下:

<delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
<group-map group-name="org.ofbiz" datasource-name="localmysql"/>
</delegator>
<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">
<group-map group-name="org.ofbiz" datasource-name="localmysql"/>
</delegator>

<delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
<group-map group-name="org.ofbiz" datasource-name="localmysql"/>
</delegator>
<delegator name="other" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
<group-map group-name="org.ofbiz" datasource-name="localmysql"/>
</delegator>
...




<datasource name="localmysql"
helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
field-type-name="mysql"
check-on-start="true"
add-missing-on-start="true"
check-pks-on-start="false"
use-foreign-keys="true"
join-style="ansi-no-parenthesis"
alias-view-columns="false"
drop-fk-use-foreign-key-keyword="true"
table-type="InnoDB"
character-set="gbk"
collate="gbk_bin">
<read-data reader-name="seed"/>
<read-data reader-name="demo"/>
<read-data reader-name="ext"/>
<inline-jdbc
jdbc-driver="com.mysql.jdbc.Driver"
jdbc-uri="jdbc:mysql://127.0.0.1/opentaps?autoReconnect=true"
jdbc-username="opentaps"
jdbc-password="opentaps-password"
isolation-level="ReadCommitted"
pool-minsize="2"
pool-maxsize="20"/>
...


4、進行系統初始化
在命令行窗口下,進入opentaps根目錄後運行
ant run-install
系統開始安裝,等大約15-30分鐘後,系統提示安裝完成。


啓動opentaps
雙擊運行opentaps目錄下的startofbiz.bat命令即可,請注意控制檯輸入默認輸出至log下的ofbiz.log中,所以無法從控制檯中判斷系統是否啓動完成,一般需等待兩到五分鐘。也可以將輸出改回至console。

訪問opentaps
打開瀏覽器訪問:http://localhost:8080/
點擊你希望訪問的功能特性,系統默認帳號爲
admin/ofbiz,擁有所有權限。


本人原創文章,歡迎轉載,轉載請註明出處!
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章