Run OFBiz with MySQL

2008-02-23 09:24:19来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

**************************************************
*** How to run OFBiz with MySQL ***
**************************************************

##################################################
### Download ofbiz source with svn
##################################################
Anonymous (Guest) Access
To connect to the OFBiz SVN Respository for anonymous checkout use your SVN client command line tool:
$ svn co http://svn.ofbiz.org/svn/ofbiz/trunk ofbiz

##################################################
### Create Database&User for OFBiz
##################################################
mysql>create database ofbiz_mysql;
mysql>grant all on *.* to ofbiz_mysql@localhost identified by 'ofbiz_mysql' with grant option;
mysql>create database ofbiz_odbc_mysql;
mysql>grant all on *.* to ofbiz_odbc_mysql@localhost identified by 'ofbiz_odbc_mysql' with grant option;

##################################################
### Set OFBiz Environment
##################################################
----------------------------------------------------------------------------------------------------
set Java_HOME=C:\j2sdk1.4.2_04
set CLASSPATH=C:\j2sdk1.4.2_04\lib\dt.jar;C:\j2sdk1.4.2_04\lib\tools.jar;.
----------------------------------------------------------------------------------------------------

#############################################################################
### Modify the [%OFBIZ_HOME%\Framework\entity\config\entityengine.XML] file
#############################################################################
----------------------------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
modify the follow segment:
<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="localderby"/>
<group-map group-name="org.ofbiz.odbc" datasource-name="localderbyodbc"/>
</delegator>
to:
<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"/>
<group-map group-name="org.ofbiz.odbc" datasource-name="odbcmysql"/>
</delegator>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
addition,modify the follow segment:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
<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="true"
drop-fk-use-foreign-key-keyword="true"
table-type="InnoDB"
character-set="latin1"
collate="latin1_general_cs">
<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/ofbiz?autoReconnect=true"
jdbc-username="ofbiz"
jdbc-password="ofbiz"
isolation-level="ReadCommitted"
pool-minsize="2"
pool-maxsize="20"/>
<!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
</datasource>
to:
<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="true"
drop-fk-use-foreign-key-keyword="true"
table-type="InnoDB"
character-set="latin1"
collate="latin1_general_cs">

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:J2ME 3D学习笔记——实现简单的界面(附代码)

下一篇:StringBuffer与String