OFBiz的安装实际上很简单,如果只是简单的安装,不需要结合mysql或者oracle之类的数据库,那么直接解压完了,分别按照说明里面的分两步运行就可以①先cmd进入到命令行模式下,cd到你当前的OFBiz的工作环境,速成${OFBIZ_HOME},也就是你的解压环境。然后运行 ant run-install。大概要运行十来分钟。②然后运行 startofbiz ,等五六分钟就可以访问了http://localhost:8080/ecommerce。
但是要结合mysql安装还是要修改一下工程里面的文件的,下面是安装步骤。
一:安装mysql。
详细参照mysql的基本安装方法,主要是要在mysql里面建立OFBiz所需要的数据库名称和用户,我们可以利用Navicat连接mysql,并且新建立一个数据库ofbiz。新建一个用户ofbiz和密码ofbiz,并且赋予ofbiz全部权限。
二:修改配置文件。
① 拷贝mysql的jdbc驱动到${OFBIZ_HOME}/framework/entity/lib/jdbc下,否则会编译的时候报没有com.mysql.jdbc.Driver驱动类。
② 解压apache-ofbiz-10.04.zip到一个目录下面,我们取名${OFBIZ_HOME},到${OFBIZ_HOME}/framework/entity/config目录下,里面有个entityengine.xml,利用文本工具打开。因为默认的数据库为derby,所以要把localderby改成
<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.olap" datasource-name="localmysql"/>
<group-map group-name="org.ofbiz.tenant" 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"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localmysql"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localmysql"/>
</delegator>
<!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "ant run-install" before running "ant run-tests" -->
<delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
<group-map group-name="org.ofbiz" datasource-name=" localmysql "/>
<group-map group-name="org.ofbiz.olap" datasource-name=" localmysql "/>
<group-map group-name="org.ofbiz.tenant" datasource-name=" localmysql "/>
</delegator>
③ 然后找到我们的mysql配置信息的地方,里面保存这基本的mysql配置信息。把这段修改成
<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"
engine="InnoDB" <!-- 现在mysql一般的引擎都是InnoDB,并且不再用table-type,改成engine -->
character-set="utf8" <!-- 为了支持国际化中文数据库字符编码要改成utf8,注意不要写成utf-8,这个比较容易出错 -->
collate="utf8_general_ci">
<read-data reader-name="seed"/>
<read-data reader-name="seed-initial"/>
<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="250"
time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
and had to set it to -1 in order to avoid this issue.
For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
<!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
</datasource>
三:运行。
① 先cmd进入到命令行模式下,cd到你当前的OFBiz的工作环境,速成${OFBIZ_HOME},也就是你的解压环境。然后运行 ant run-install。大概要运行十来分钟,如果表都建好了说明安装已经成功了。
② 然后运行 startofbiz ,等五六分钟就可以访问了http://localhost:8080/ecommerce。
分享到:
相关推荐
ofbiz的安装配置指南,适用于初学者!可能和版本有关,请自行调试
关于ofbiz的资料,很多,用ofbiz技术的朋友们赶快下载吧
OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门
包括:自动安装mysql服务,设置ofbiz启动所需jre环境,生成桌面启动ofbiz server的快捷方式。 包含文件:winrar自解压启动文件install.bat及ofbiz的启动文件ant.bat及目录截图。 ofbiz及绿色版mysql和jre不在资源内...
Ofbiz的电商的新建用户逻辑 10 ofbiz导出的PDF中文乱码 10 外部系统调用Ofbiz中的服务方法 11 Ofbiz的Content管理 12 OFBiz的MVC框架 12 OFBiz服务引擎 14 ofbiz实体引擎(九) 多租户 31 菜单权限配置 34 ofbiz权限...
WIN7上安装Ofbiz 数据库 postgresql 希望对大家有所帮助
自学整理的ofbiz学习笔记,自学整理的ofbiz学习笔记,自学整理的ofbiz学习笔记,自学整理的ofbiz学习笔记,适合初学者,可以下个看看
ofbiz默认是使用java 的derby数据库,本文档是如何修改成mysql数据库
里面是下载地址,如果逆向开发ofbiz,只要下载它就绝对没错了 Apache+OFBiz+开发初学者指南.rar OFBiz开发快速入门.rar OFBiz-技术文档.rar OFBiz API中文版.rar Apache OFBiz Cookbook Sep 2010.rar Opentaps ...
像 Tomcat, Ant, BeanShell, Jboss 等,构建了一个强大的系统平台,Ofbiz 已经完成了大部分商务类软件系统 都需要的部件,像用户认证、工作流、商务规则处理等,Ofbiz 的核心技术在于 Entity Engine,其他的组件基本...
ofbiz的获取与部署,主要用到了gradle 和 eclipse,注意:cmd部署时,需要一个较好的网络环境以下载gradle
ofbiz jar file, some jars for ofbiz
OFBiz集成Spring和Activiti,详细设计说明书。ofbiz版本12.04
ofbiz sql 表结构
ofbiz数据结构
浅谈OFBIZ.doc浅谈OFBIZ.doc浅谈OFBIZ.doc浅谈OFBIZ.doc浅谈OFBIZ.doc
OFBIZ开发指南 英文2OFBIZ开发指南 英文2OFBIZ开发指南 英文2
ofbiz权限非常介绍,ofbiz进阶之权限介绍!
OFBiz 主题修改文档
apache-ofbiz-16.11.02.zip,ofbiz菜鸟笔记,Apache+OFBiz+开发初学者指南.chm