OFBiz workflow Learning (2)

Source: Internet
Author: User

OFBiz installation and configuration

The default web server provided by ofbiz2.11 is Jetty. We plan to transfer it to Tomcat. The default database provided by ofbiz2.11 is hsql. It is very convenient to use WebTools to transfer its database. Here we will introduce how to install it in MySQL.

I don't think you should ask why you want to install it like this. After you install it twice in this article, you understand everything.

 

1 download ofbiz2.11
You can download from www.ofbiz.org, or go to the http://sf.net to find the OFBiz project download.

 

2. Download and install Tomcat
We recommend that you use Versions later than atat4.1.18. You have seen on the Internet that when you run OFBiz in versions earlier than tomcat.4.1.7, the processing of taglib is very slow, and later versions will not have this problem. Tomcat can be downloaded at www.apache.org.

 

3. Install MySQL

It mainly creates tablespaces and users.

 

4. Install OFBiz

 

4.1 set Environment Variables
Java_home
Ant_home
Catalina_home
Ofbiz_home

 

4.2 copy the classes and jar files

Copy all files under the ofbiz_home/commonapp/etc/directory to catalina_home/share/classes.
Copy *. jar from the ofbiz_home/commonapp/lib/directory to catalina_home/share/lib.
Copy *. Jar under the directory ofbiz_home/CORE/lib/to catalina_home/share/lib.
Copy *. Jar under the ofbiz_home/lib/directory to catalina_home/share/lib.
Note that the jar files in ofbiz_home/lib/are stored in different categories by directory. to copy them to catalina_home/share/lib, remove all directories and put all jar files under the lib directory.

 

4.3 edit the catalina_home/share/classes/entityengine. xml file

Find the following text:

<Datasource name = "localmysql"

Helper-class = "org. OFBiz. Core. entity. generichelperdao"

Field-type-name = "MySQL"

Check-on-Start = "true"

Add-missing-on-Start = "true"

Use-foreign-keys = "false"

Join-style = "theta-Oracle">

<SQL-load-Path = "commonapp/DB" prepend-Env = "OFBiz. Home"/>

<SQL-load-Path = "ecommerce/etc" prepend-Env = "OFBiz. Home"/>

<Inline-JDBC

JDBC-driver = "org. gjt. Mm. MySQL. Driver"

JDBC-uri = "JDBC: mysql: // 127.0.0.1/OFBiz"

JDBC-username = "root"

JDBC-Password = "GG"

Isolation-level = "serializable"/>

</Datasource>

Edit the configuration.

Search
<Delegator name = "default" entity-model-reader = "Main" ......>
<Group-Map group-name = "org. OFBiz. commonapp" datasource-name = "localhsql"/>
</Delegator>
Change
<Delegator name = "default" entity-model-reader = "Main" ......>
<Group-Map group-name = "org. OFBiz. commonapp" datasource-name = "localmysql"/>
</Delegator>

 

4.4 copy the executable program

Copy OFBiz. bat from ofbiz_home/Setup/catalina41/bin to catalina_home/bin.
Copy server. XML from ofbiz_home/Setup/catalina41/conf to catalina_home/CONF.
Note: The server. xml here can also be copied. In this case, configure the context of OFBiz and manually update it to server. xml.
Note that OFBiz and tomcat are in the same directory by default. Therefore, in server. XML, their context paths are both relative paths.
For example
<Context Path = "/content" docbase = ".../OFBiz/content/webapp" DEBUG = "0" reloadable = "true">

 

4.5 start
In ofbiz_home/Setup/catalina41/bin/runofbiz. bat
The content is as follows:
OFBiz. BAT Run

Use this command to start

It first calls OFBiz. BAT to set the environment variable, and then starts tomcat.
When Tomcat is started, databaseutils of OFBiz checks whether the database has a system table. If it does not exist, it is automatically created. The general creation process will not be wrong.
If an error occurs, check the log files in catalina_home/logs. Generally, some jar files are missing. Find the missing jar files in ofbiz_home and copy them to catalina_home/share/lib.

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.