1、Apache OFBiz Getting Started Apache OFBiz 之旅 1. Apache OFBiz介绍 2 1.1 The What, Why and How of Apache OFBiz 2 1.2. How Do I Decide What to Use? 2 2. Second Part Mailing Lists 3 3. Demo and Test Setup Guide示例和安装指南 5 3.1. Introduction 5 3.2. Quick & Easy Setup 5 3.3. Building From SVN 6 3.4.
2、Database Setup 7 3.5. J2EE Containers 8 4. The Open For Business Project: Entity Engine Configuration Guide 8 1. Apache OFBiz介绍 这个档和相关文档信息内容来开始我们的OFBiz之旅。 This document and it's related documents contain information about getting started with OFBiz. 阅读这编
3、文档后你也许可以得到一些帮助同时也开始了Apache OFBiz精彩世界之旅。 After reading this document you might find these helpful as well as you get started on your journey into the wonderful world of Apache OFBiz: · Mailing Lists(邮件发送清单) · Demo and Test Setup Guide(示例测试指南) · Technical Production Setup Guide(技术产品指南) · Business
4、 Setup Guide(业务指南) · OFBiz Source Repository and Access(OFBiz源码库和通道) · Framework Introduction Videos and Diagrams(框架介绍的视频和图表) · OFBiz Beginners Development Guide Using Practice Application · OFBiz Contributors Best Practices 1.1 The What, Why and How of Apache OFBiz The basic structure and dri
5、ving force behind OFBiz has a lot to do with the goals and actualization of the release process. OFBiz is and always has been a community-driven open source project. There is no central commercial organization that drives the development of OFBiz or derives a project from the intellectual property
6、of the software or other project assets. This is formalized now that OFBiz is a project in the Apache Software Foundation. Because of this OFBiz always has been and always will be just what users who contribute to the project want it to be. There are many different individuals and groups involved w
7、ith many different needs and our goal is to define and follow development and release policies that serve the needs of these parties. So, let's start with that... 1.2. How Do I Decide What to Use? From a project user perspective there is one main question that can help determine which way they wi
8、ll want to get OFBiz: Do I want to contribute to the open source project? For this question there are 3 main answers: 1 Yes, definitely: I want to contribute to design, coding, and testing efforts and thereby collaborate with others to more effectively and efficiently satisfy the long-term require
9、ments from me, my clients, or my employer 2 Kind of: I want to stay on the cutting edge and participate with testing and feedback, but I'm not in a position to participate in development and/or in the near future I will need something more reliable and supported and that won't change very much 3 N
10、ot really: I'm happy to offer feedback, but I really need something that will work well now and well into the future so we can get things going in our organization For each answer there is a recommended way to get OFBiz: 4 Get the code straight from the code repository (SVN) trunk and update frequ
11、ently through development, stopping before your integration or final pre-deployment testing, and periodically even after production deployment according to your ongoing develop/deploy plan; note that when you are not updating from SVN you should continue to watch the commits for bug fixes to patch i
12、nto your code base 5 Get the code from the code repository (SVN) release branch and keep updated or patched regularly as fixes are committed and the branch stabilizes over time; when getting started choose the most recent branch, even if it is very new; when new release branches are created update
13、to them soon after the branch is done 6 Get a built release package or the code from a release branch tag, and update as new pre-built release packages and tags are created; these will only represent fixes and unless a major issue arises they will be backward compatible and generally safe to update
14、 or patch to; when getting started choose a release branch that has been around for at least 2-3 months and that has no major outstanding issues in the issue tracker to assure that it has stabilized; when new release branches are created wait until you are ready to do a major upgrade and possibly ne
15、ed to modify your code and configuration, and wait at least until the prospective branch has stabilized before moving to it 2. Second Part Mailing Lists To subscribe to a mailing list use the links below. In your first email you will get some information about working with the list manager EZMLM.
16、 To unsubscribe from any of the following lists, you need to send an empty, subjectless email to unsubscribe address listed below. In other words, click the appropriate unsubscribe link below and press send. Support of Users and Developers List: The user list is intended for installation, deploym
17、ent, custom development and usage related topics. High Traffic Subscribe Unsubscribe Archives Digest Subscription: Subscribe Unsubscribe Searchable Archives: Nabble MarkMail When you ask a complex questions on this list, it's better to give details. Most of the time URLs are enough and welcome.
18、 Else please follow this scenario (at leat relevant parts) Why · What you were looking for · How did you try to achieve it · What did you expect as results · And what you really got How 1 What you did (including detailed steps to reproduce) 2 What you expected to happen 3 What actually happ
19、ened (including exact quotes of error messages, etc) 4 If possible provide an URL Design and development List: The developer list is strictly for topics related to the design and development of the OFBiz Project itself. Please don't ask questions relevant to User Mailing List in this Mailing Li
20、st. If you are not sure to which list to post, do it into User Mailing List. By the way, you should get much more attention from this list for users questions type. High Traffic Subscribe  Unsubscribe Archives Digest Subscription: Subscribe Unsubscribe Searchable Archives: Nabble MarkMail C
21、ommits List: The commits list is used to notify subscribers of commits to the OFBiz SVN repository and is not used for discussions. High Traffic Subscribe  Unsubscribe Archives Digest Subscription: Subscribe Unsubscribe Searchable Archives: Nabble MarkMail 2.1. Global Searchable Archive
22、s To search in all Nabble forums, in all OFBiz MLs with MarkMail Plugin search tools for Firefox using Nabble or Mark Mail 2.2. History For history you may look at · dev · user · svn · Jira There is no embedded search tool but you may use google site search option 2.3. Searching in the w
23、iki As Confluence wiki is shared among projects at the ASF, if you want to search only for OFBiz information you can use the OFBiz Advanced Search page. Or you can follow these steps: 5 Add the 5 OFBiz spaces (or whatever you want) into your favorite spaces. For that, browse and click on the 'St
24、ar' besides any spaces to add, or if you see any stars there, whilst in a space click on Tools > Favorite. The star should go yellow. 6 Click in the search box and press enter to get the advanced search (Which should bring you to ) 7 Type in your search term then choose 'Favorite Spaces' from the
25、'Where' drop down box. 8 Click on filter. Results from only the spaces you have added to favorites will be shown. Personnaly I have also added the 5 spaces as watches to receive everyday a summary of changes in these space. This also build you a correct dashboard (My Dashboard). 3. Demo and Te
26、st Setup Guide示例和安装指南 3.1. Introduction 这编文档描述了OFBiz的安装和业务项目的基本配置选项。有关更具体的介绍请看OFBiz Framework Configuration Guide, Entity Engine (database) Configuration Guide, Service Engine Configuration Guide, 和 OFBiz Documentation Index this document describes an initial setup process and basic configuration
27、 options for the Open For Business Project. For more detail see related documents such as the OFBiz Framework Configuration Guide, the Entity Engine (database) Configuration Guide, the Service Engine Configuration Guide, and other related documents you may found at OFBiz Documentation Index If you
28、run into trouble there are various resources available to help. The first steps would be to search on the New OFBiz Docs Site and Old OFBiz Wiki (now archived), and then on the OFBiz Mailing Lists. If you can't find you answer there, then subscribe to the Apache OFBiz Users Mailing List, and send a
29、message with as much detail as possible about the problem you are having. 3.2. Quick & Easy Setup You can get up and running quickly by downloading the OFBiz Complete distribution and following some simple instructions. For more options and explanations, see the rest of this document. 1 Download
30、and install the Java 2 v1.5 series JDK/J2SDK (not the JRE, you need the full SDK) from Sun's Java (J2SE) site if you intent to use a release prior to R10.04 or trunk else use 1.6, and make sure your JAVA_HOME environment variable is set to this JDK after installation (NOTE that for Mac OS X no JVM s
31、etup is needed, just make sure Java is up to date with the OS X Software Update facility). Note also that OpenJdk is still not recommended, there are still some compilation problmems with it (today: 2023-05-27) 2 Download the OFBiz release archiveand unzip it in the directory of your choice (see co
32、mments below about that, so for now checking out of SVN repository is preferred, see below...). This should create one sub-directory: ofbiz. This will be the OFBIZ_HOME location. 3 Start OFBiz with embedded Tomcat by going into the ofbiz directory and then running "startofbiz.bat" (or "%JAVA_HOME%\
33、bin\java -jar ofbiz.jar") for Windows, or "./startofbiz.sh"(or "$JAVA_HOME/bin/java -jar ofbiz.jar") for Linux/Unix. For OS X you can just run "java -jar ofbiz.jar" and you don't need to setup the JAVA_HOME or anything because it is already there. 4 Open a browser and go to :8080/ecommerce/control/
34、main for the ecommerce application or :8443/webtools/control/main for the WebTools application or :8443/catalog/control/main for the Catalog Manager application. 5 The default administrative account is username: "admin", password: "ofbiz". 6 Have fun with it! You are running on a Java database. Fo
35、r more discussion of databases, read the section below on that topic. 7 For more detailed options and configuration information, read on! 3.3. Building From SVN When building from SVN you will need to have a Java 1.5 series J2SDK (NOT just the JRE, need to full SDK) as mentioned above, for releas
36、e prior to R10.04 or trunk else use 1.6. The build is done using Ant, and sufficient Ant libraries are included with OFBiz. If you have Ant installed separately just make sure you have version 1.5 or later, and then run Ant as normal intead of as listed in the following examples. In the directory w
37、here you want OFBiz to be, do a SVN checkout of the ofbiz trunk. For example: svn co ofbiz For information on connecting to SVN click here. Now go into the "ofbiz" directory and run "ant.bat" (Windows), or "./ant" (Linux/Unix/OSX). It will compile all modules and leave you an executable jar (ofb
38、iz.jar) in the "ofbiz" directory. To load the seed and demo data, run "ant.bat run-install" or "%JAVA_HOME%\bin\java -jar ofbiz.jar install" (Windows), or "./ant run-install" or*"$JAVA_HOME/bin/java -jar ofbiz.jar install"* (Linux/Unix/OSX) As an alternative to the previous step: to load the seed
39、data only, run "ant.bat run-install-seed" or "%JAVA_HOME%\bin\java -jar ofbiz.jar install -readers=seed" (Windows), or "./ant run-install-seed" or*"$JAVA_HOME/bin/java -jar ofbiz.jar install -readers=seed"* (Linux/Unix/OSX) To start the server run "ant.bat run" or "%JAVA_HOME%\bin\java -jar ofbiz.j
40、ar" (Windows), or "./ant run" or "$JAVA_HOME/bin/java -jar ofbiz.jar" (Linux/Unix/OSX) Another build option in the Ant build script that is useful is "ant.bat clean" (Windows) or "./ant clean" (Linux/Unix/OSX). That will clean out all built classes allowing you to run "ant" again to get a clean bui
41、ld. If you are running into funny errors after updating from SVN in the future, give this clean build process a try first. 3.4. Database Setup Database setup is done in the entityengine.xml file. There are many options there which are described in the Entity Engine Configuration Guide The OFBiz p
42、ackage comes with Derby, an open source Java database from IBM that complies with DB2 specs and is based on the Cloudscape product. This database is good for demonstration purposes because it is easy to setup and use. It is not the best for large data sets and does not provide the same performance o
43、r scalability that a major database would, but compared to HypersonicSQL (that we used to use) it is significantly better because while not as fast for small scale operations it is closer to a production database environment and allows us to catch issues earlier on. Smaller sites might even consider
44、 this as an option for their production deployment, especially once the database is a bit more stabilized. There are many open source databases that will scale well and deliver good performance. The two most popular are PostgreSQL and MySQL (4.1.11 or later, or the 5 series) . Postgres is a very fu
45、ll featured database with transaction support, foreign keys, stored procedures, et cetera. Postgres also has very friendly license terms. MySQL is a pretty good option these days as well. Please note that if you use this in a commercial production instance you may have to purchase a commercial licen
46、se because it is GPL licensed and so is the JDBC driver. MySQL AB allows use of the JDBC driver in open source projects in spite the GPL license, but this may not apply for commercial use of a modified OFBiz. For some a commercial license is the preferred way to go anyway because of support and warr
47、anty and other issues. For those with this preference considering Postgres there is also a commercial Postgres derivative called EnterpriseDB. Commercial databases are also supported. If you have database licenses for other needs, or have major in-house familiarity with and support for a certain co
48、mmercial database, then there is no reason not to take advantage of that. OFBiz has been tested with Oracle, DB2, Sybase, MS SQL Server and others and should work fine with any database that has a JDBC driver. Please note that we have experienced that in some cases the JDBC drivers included with cer
49、tain databases are not fully specification compliant. The options are often to use the database-specific APIs or to get a third party driver. The database-specific code is an issue because of licensing restrictions and additional difficulty needed to keep up with them, so sometimes a third party (ev
50、en a commercial one) is preferred. For example with Oracle we have had much more success with the DataDirect JDBC driver. There is no need to run any SQL scripts to create the tables or populate them with the default data. The entity engine can create missing tables or fields when the server starts






