Sunday, June 21, 2009

OFBiz Development Environment Setup

Here I am providing an initial setup process and basic configuration options for the OFBiz.

You can get up and running quickly by downloading the OFBiz Complete distribution and following some simple instructions :

A. Tools Installation:

1. Download and install the Java 1.4 or higher (not the JRE, you need the full SDK) from Sun's Java (J2SE) site, and make sure your JAVA_HOME environment variable is set to this JDK after installation.

2. You will also need Ant 1.6 or higher version.

B. OFBiz Installation:

3. Download the OFBiz release archive and unzip it in the directory of your choice.

4. Now run "ant run-install" command in the OFBiz home directory (the directory where you installed OFBiz). This will load only the basic “demo” and “seed” data. Seed Data is data that an application requires in order to run. The demo data has additional data setups of your company

C. Running OFBiz:

5. There are various ways to run OFBiz :-

Start OFBiz with embedded Tomcat by going into the ofbiz directory and then running "startofbiz.bat" (or "%JAVA_HOME%\bin\java -jar ofbiz.jar") for Windows, or "./startofbiz.sh"(or "$JAVA_HOME/bin/java -jar ofbiz.jar") for Linux/Unix.

6. Open your web browser and goto,https://localhost:8443/partymgr/control/main.This is a secured site notice the (s), https. Since we have not setup the certificate it will give a warning, say YES.

7. Login as “admin” with the password “ofbiz”. This will give you complete control over the administration of the site.

Additional Information :

D. DataBase Setup:

8. By default OFBiz includes and is configured for an embedded Java database called Derby.

- If you don't want to use the embedded Derby database then install your database of choice.

- If necessary, put the correct JDBC driver in:

${ofbiz install dir}/framework/entity/lib/jdbc

- To setup the Entity Engine to use a different database from the default Derby database make following changes in the : ${ofbiz install dir}/framework/entity/config/entityengine.xml file

  1. Change the "datasource-name" attribute under the from the default "localderby" to "localmysql" or other database that you want to use. Do not change localderbyodbc.
  2. Look for further down.
  3. Change the "jdbc-uri" under "localmysql" to "jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"
  4. Change the "jdbc-username" to "ofbiz"
  5. Change the "jdbc-password" to the password you chose above

After the database setup, now you need to load data, you can load data by using this initial command: ant run-install

E. OfBiz Configuration:

9. Create and setup a certificate. I am currently not doing it so I can’t explain it now.

10. Most of the configurations can be left to default values. The few things you most probably would change are currency and country, this has to be done in\ofbiz\framework\common\config\general.properties file.

- Currency: To set INR as the default currency, use the below setting

currency.uom.id.default=INR

- Country: To set INDIA as the default country for drop downs, use the below setting

country.geo.id.default=IND

11. E-mail settings may be configured in the following, OfBiz files:

- ${ofbiz install dir}/framework/common/config/general.properties

Ø SMTP Server (relay host): mail.smtp.relay.host

Ø SMTP Username (if needed): mail.smtp.auth.user

Ø SMTP Password (if needed): mail.smtp.auth.password

Ø Turn on mail notifications by setting mail.notifications.enabled property=”Y"

Hope it would helpful for you friends. Enjoy Learning !!!

6 comments:

  1. i did all things but the problems is when u open the 1st login page nd then provide user name=admin nd password=ofbiz in that page Email password is there what is the use of that when i click on that where data goes ????????/

    sir one more Question what to write here
    mail.smtp.relay.host=??

    mail.smtp.auth.user=??

    mail.smtp.auth.password=??

    can u pls tell me the solution???

    ReplyDelete
  2. let me know about the Entity engine of ofbiz ,i am working on opentaps ERP which is using ofbiz .

    ReplyDelete
  3. how to deploy ofbiz through Weblogic??

    ReplyDelete
  4. Hi,
    I have same question as above.
    How to deploy ofbiz through some other webapp?
    I want to run it as part of a separate tomcat/weblogic appserver and dont want to use the inbuilt catalina layer.

    Please let me know incase you have some solution.

    Thanks,
    Vibhav Agrawal
    agrawal_vibhav@yahoo.com

    ReplyDelete
  5. Hi,


    I configure the email with abc@gmail.com and it works fine when send mail from ofbiz. Now I would like to change the email address as xxx@gmail.com so I configured the mail with xxx@gmail.com.But now when I send the mail from ofbiz all are receiving as a old mail configured(abc@gmail.com) . The new mail configured is not working. How to configure the new account of gmail

    ReplyDelete
  6. hi! Hope you can help me, I'm running apache2 on my /etc/apache2 (with serveral php websites running on this server). I'd like to install OfBiz at /opt/ ... I understand both will be using port 80. I'm using Ubuntu 10.10 (yes not updated)..I pre installed my java 6.

    Can my apache2 ( installation ) & apache OFBIZ run simultaneously.. or there's a way to run OFBIZ under apache2.. I hope I make sense. Great help if you can point me to the right direction.

    ReplyDelete