OFBiz slimming
Because OFBiz has many tables and does not have much information for our reference (at least the Chinese version is the same), I don't know where to start learning. After one night of study (of course there is also a half-month basis), I finally reduced the OFBiz table to only 66, which makes it much easier to learn. The specific method is as follows:
1. Create the database OFBiz in MySQL and modify the file OFBiz \ framework \ entity \ config \ entityengine. xml,
XML Code
- delegator name = " default " entity 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>
-
-
- <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="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="Root"
- JDBC-Password="Root"
-
- Isolation-level="Readcommitted"
-
- Pool-minsize="2"
- Pool-maxsize="20"/>
-
- <! -- <JNDI-jdbc JNDI-server-name = "localjndi" JNDI-name = "Java:/mysqldatasource" isolation-level = "serializable"/> -->
-
- </Datasource>
2. Comment out applications, specialpurpose and hot-deploy in OFBiz \ framework \ base \ config \ component-load.xml. The result is as follows:
XML Code
- <Component-loader Xmlns: xsi=Http://www.w3.org/2001/XMLSchema-instance"Xsi: nonamespaceschemalocation=Http://www.ofbiz.org/dtds/component-loader.xsd">
-
- <Load-Components Parent-directory="$ {OFBiz. Home}/framework"/>
- <! -- <Load-components parent-directory = "$ {OFBiz. Home}/Applications"/> -->
-
- <! -- <Load-components parent-directory = "$ {OFBiz. Home}/specialpurpose"/> -->
-
- <! -- <Load-components parent-directory = "$ {OFBiz. Home}/hot-deploy"/> -->
-
- </Component-loader>
3. comment out the workflow, testtools, and example in the OFBiz \ framework \ component-load.xml file. The result is as follows:
XML Code
- <Component-loader Xmlns: xsi=Http://www.w3.org/2001/XMLSchema-instance"Xsi: nonamespaceschemalocation=Http://www.ofbiz.org/dtds/component-loader.xsd">
-
- <Load-component Component-location="$ {OFBiz. Home}/framework/Geronimo"/>
- <Load-component Component-location="$ {OFBiz. Home}/framework/entity"/>
-
- <Load-component Component-location="$ {OFBiz. Home}/framework/Catalina"/>
-
- <! -- <Load-component-location = "$ {OFBiz. Home}/framework/Jetty"/> -->
- <Load-component Component-location="$ {OFBiz. Home}/framework/security"/>
-
- <Load-component Component-location="$ {OFBiz. Home}/framework/datafile"/>
- <Load-component Component-location="$ {OFBiz. Home}/framework/minilang"/>
-
- <Load-component Component-location="$ {OFBiz. Home}/Framework/Common"/>
- <Load-component Component-location="$ {OFBiz. Home}/framework/service"/>
-
- <Load-component Component-location="$ {OFBiz. Home}/framework/entityext"/>
- <Load-component Component-location="$ {OFBiz. Home}/framework/webapp"/>
-
- <Load-component Component-location="$ {OFBiz. Home}/framework/guiapp"/>
- <Load-component Component-location="$ {OFBiz. Home}/framework/widget"/>
-
- <Load-component Component-location="$ {OFBiz. Home}/framework/appserver"/>
-
- <! -- <Load-component-location = "$ {OFBiz. Home}/framework/workflow"/> -->
- <! -- Load-component-location = "$ {OFBiz. Home}/framework/shark"/> -->
-
- <! -- <Load-component-location = "$ {OFBiz. Home}/framework/testtools"/> -->
-
- <Load-component Component-location="$ {OFBiz. Home}/framework/WebTools"/>
- <Load-component Component-location="$ {OFBiz. Home}/framework/images"/>
-
- <! -- <Load-component-location = "$ {OFBiz. Home}/framework/example"/> -->
-
- </Component-loader>
4. Open the doc and run the following command in the OFBiz directory:
Ant clean-all
Ant run-install
Startofbiz. bat
7. https: // localhost: 8443/WebTools/
5. after step 1 is executed, there is only one system record in the user_login table, but the password field of the record is empty. You need to change it to the "OFBiz" encryption code, in addition, the value of the enable field is "N", indicating that the user is unavailable. You need to change the value to "Y". The two SQL statements executed are as follows:
SQL code
- UpdateUser_loginSetCurrent_password ='47ca69ebb4bdc9ae0adec130880165d2cc05db1a';
- UpdateUser_loginSetEnabled ='Y';
6. Start OFBiz. Currently only WebTools are available (http: // localhost: 8080/WebTools). User Name/password: System/OFBiz
Reprinted from: http://zhaxg.iteye.com/blog/510547