Turn OFBiz slimming [verified, 9.04-11.04 for slight modification available]

Source: Internet
Author: User

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
  1. delegator name = " default " entity entity-model- reader = "Main" entity -group-reader = "Main" entity-ECA-reader = "Main" distributed -Cache-clear -enabled = "false"
  2. <Group-Map Group-name="Org. OFBiz" Datasource-name="Localmysql"/>
  3. </Delegator>
  4. <Datasource Name="Localmysql"
  5. Helper-class="Org. OFBiz. entity. datasource. generichelperdao"
  6. Field-type-name="MySQL"
  7. Check-on-start="True"
  8. Add-missing-on-start="True"
  9. Check-PKS-on-start="False"
  10. Use-foreign-keys="True"
  11. Join-style="ANSI-no-parenthesis"
  12. Alias-View-Columns="False"
  13. Drop-FK-use-foreign-key-Keyword="True"
  14. Table-type="InnoDB"
  15. Character-Set="Latin1"
  16. Collate="Latin1_general_cs">
  17. <Read-Data Reader-name="Seed"/>
  18. <Read-Data Reader-name="Demo"/>
  19. <Read-Data Reader-name="Ext"/>
  20. <Inline-JDBC
  21. JDBC-driver="Com. MySQL. JDBC. Driver"
  22. JDBC-Uri="JDBC: mysql: // 127.0.0.1/OFBiz? Autoreconnect = true"
  23. JDBC-Username="Root"
  24. JDBC-Password="Root"
  25. Isolation-level="Readcommitted"
  26. Pool-minsize="2"
  27. Pool-maxsize="20"/>
  28. <! -- <JNDI-jdbc JNDI-server-name = "localjndi" JNDI-name = "Java:/mysqldatasource" isolation-level = "serializable"/> -->
  29. </Datasource>

2. Comment out applications, specialpurpose and hot-deploy in OFBiz \ framework \ base \ config \ component-load.xml. The result is as follows:

XML Code
  1. <Component-loader Xmlns: xsi=Http://www.w3.org/2001/XMLSchema-instance"Xsi: nonamespaceschemalocation=Http://www.ofbiz.org/dtds/component-loader.xsd">
  2. <Load-Components Parent-directory="$ {OFBiz. Home}/framework"/>
  3. <! -- <Load-components parent-directory = "$ {OFBiz. Home}/Applications"/> -->
  4. <! -- <Load-components parent-directory = "$ {OFBiz. Home}/specialpurpose"/> -->
  5. <! -- <Load-components parent-directory = "$ {OFBiz. Home}/hot-deploy"/> -->
  6. </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
  1. <Component-loader Xmlns: xsi=Http://www.w3.org/2001/XMLSchema-instance"Xsi: nonamespaceschemalocation=Http://www.ofbiz.org/dtds/component-loader.xsd">
  2. <Load-component Component-location="$ {OFBiz. Home}/framework/Geronimo"/>
  3. <Load-component Component-location="$ {OFBiz. Home}/framework/entity"/>
  4. <Load-component Component-location="$ {OFBiz. Home}/framework/Catalina"/>
  5. <! -- <Load-component-location = "$ {OFBiz. Home}/framework/Jetty"/> -->
  6. <Load-component Component-location="$ {OFBiz. Home}/framework/security"/>
  7. <Load-component Component-location="$ {OFBiz. Home}/framework/datafile"/>
  8. <Load-component Component-location="$ {OFBiz. Home}/framework/minilang"/>
  9. <Load-component Component-location="$ {OFBiz. Home}/Framework/Common"/>
  10. <Load-component Component-location="$ {OFBiz. Home}/framework/service"/>
  11. <Load-component Component-location="$ {OFBiz. Home}/framework/entityext"/>
  12. <Load-component Component-location="$ {OFBiz. Home}/framework/webapp"/>
  13. <Load-component Component-location="$ {OFBiz. Home}/framework/guiapp"/>
  14. <Load-component Component-location="$ {OFBiz. Home}/framework/widget"/>
  15. <Load-component Component-location="$ {OFBiz. Home}/framework/appserver"/>
  16. <! -- <Load-component-location = "$ {OFBiz. Home}/framework/workflow"/> -->
  17. <! -- Load-component-location = "$ {OFBiz. Home}/framework/shark"/> -->
  18. <! -- <Load-component-location = "$ {OFBiz. Home}/framework/testtools"/> -->
  19. <Load-component Component-location="$ {OFBiz. Home}/framework/WebTools"/>
  20. <Load-component Component-location="$ {OFBiz. Home}/framework/images"/>
  21. <! -- <Load-component-location = "$ {OFBiz. Home}/framework/example"/> -->
  22. </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
    1. UpdateUser_loginSetCurrent_password ='47ca69ebb4bdc9ae0adec130880165d2cc05db1a';
    2. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.