opentaps 1.4 安装

opentaps 1.4 安装

1.下载安装 JDK1.6,并设置环境变量:JAVA_HOME。

2.下载 MySQL数据库:mysql-5.0.15-win32.rar,解压到 E 盘。

3.下载 opentaps:opentaps-1.4-preview-2.zip,解压到 E 盘。

4.设置实体引擎( Entity Engine)的缺省数据库为mysql.在修改 ${ofbiz install dir}/framework/entity/config/entityengine.xml文件中修改配置:

   a.修改数据库连接参数:
<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=" utf8"   --字符集
            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/ opentaps14?
autoReconnect=true"  --数据库名
                jdbc-username=" root--用户名
                jdbc-password=""   --密码
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- ####-->
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
    </datasource>

    b. 修改实体引擎的数据库缺省配置如下:将datasource-name的值设置为 localmysql:
<!-- the connection factory class to use, one is needed for obtaining connections/pools for defined resources -->
    <connection-factory class="org.ofbiz.entity.connection.DBCPConnectionFactory"/>

    <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"/>
    </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"/>
    </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"/>
    </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>

5.修改 build.xml 文件中关于JVM启动参数的配置,将内存配置按照你电脑的实际能力进行修改,如:
<project name="OFBiz Main Build" default="build" basedir=".">
    <property name="site.dir" value="../site"/>
    <property name="memory.initial.param" value="-Xms 128M"/>
    <property name="memory.max.param" value="-Xmx 256M"/>
    <property name="permmemory.max.param" value="-XX:MaxPermSize= 256m"/>

6.修改 startofbiz.bat文件中关于JVM启动参数的配置,将内存配置按照你电脑的实际能力进行修改,如:
"%JAVA_HOME%\bin\java" -Xms 128M -Xmx 512M -XX:MaxPermSize= 256M -jar ofbiz.jar > runtime\logs\console.log


7.打开dos并在 opentaps-1.4-preview-2 目录下执行命令(时间较长):
ant run-install
startofbiz.bat

8.启动成功,可以打开以下界面:
http://localhost:8080/ecommerce;
https://localhost:8443/webtools;

至此,opentaps 1.4 安装成功。

你可能感兴趣的:(jvm,xml,mysql,ant,dos)