<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 6  文章 - 129  trackbacks - 0
    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(14)

    隨筆檔案(6)

    文章分類(467)

    文章檔案(423)

    相冊

    收藏夾(18)

    JAVA

    搜索

    •  

    積分與排名

    • 積分 - 825681
    • 排名 - 49

    最新評論

    閱讀排行榜

    評論排行榜

    原文:http://wiki.openbravo.com/wiki/ERP/2.50/Development_Stack_Setup


    Summary

    This article explains in detail how to install and configure the whole stack required for a Openbravo ERP development environment, including:

    • PostgreSQL.
    • Oracle.
    • Sun JDK.
    • Apache Ant.
    • Apache Tomcat.

    The whole guide is valid for all the hardware architectures the stack supports, such as x86 or x86_64. A minimum of 2GB or RAM is recommended for x86 and 3GB for x86_64.


    Motivation

    A development setup has different needs than a production environment. The main goal is to make the developer's life as easy as possible, while increasing the productivity.

    Some of the components are configured in the same way as in a production system. In those cases a link to the production environment setup is provided.


    Operating System

    We recommend using Linux or another UNIX-alike flavor (*BSD, OS-X, OpenSolaris). The amount of useful development tools provided by these operating systems are vastly superior to the rest, at least regarding Openbravo ERP. Do not use Windows.

    Create an unprivileged user for you in this operating system. And once the environment is configured, avoid using the root user for anything related to Openbravo ERP development. Specially, do not compile as root.

    PostgreSQL

    Follow the installation steps to install PostgreSQL, configure an admin (postgres) password, and setup the MD5 password authentication. 8.3.5 or higher is the recommended version. Additionally, make sure the postgresql-contrib modules is installed (UUID requires it). Once it is installed, and to make the database accessible from anywhere, so that external developers or yourself can access it easily with PgAdmin3, psql or any other development tool. Locate and edit the postgresql.conf file, and uncomment the following line, assigning this new value:

    listen_addresses='*'

    This makes the database be listening in all the interfaces available in your system and not only in localhost (default).

    Locate and edit the pg_hba.conf file, and add this line at the end:

    host    all         all         0.0.0.0/0          md5

    Or if you want more security you can change the 0.0.0.0/0 with the concrete IP that you want to give access for example 1.2.3.4/32.

    Just for safety purposes, this assumes you have a firewall in your local LAN preventing outsiders to access the database.

    Image:Bulbgraph.png   As an example, in Ubuntu 10.04, these file are located in /etc/postgresql/8.4/main, assuming that you have installed PostgreSQL 8.4.x

    Oracle

    Do not use Oracle XE 10g. It's 4GB storage limitation makes it useless for heavy development in a few days, and it has a bug that happens usually when using Openbravo ERP. Therefore, the recommended version is Standard Edition 11g (>=11.1.0.6.0).

    The number of open cursors should be 3000 at least. To verify this:

    SELECT value FROM v$parameter WHERE name = 'open_cursors';

    To increase it:

    ALTER SYSTEM SET open_cursors = 3000 SCOPE=BOTH;

    Make sure that the number of processes is 150 at least. To verify this:

    SELECT value FROM v$parameter WHERE name = 'processes';

    To increase it:

    ALTER SYSTEM set processes=150 SCOPE=SPFILE;

    And restart Oracle after doing this change.

    Sun JDK

    Follow the installation steps to set up the Sun JDK. Notice that version JDK 1.6 must be used for version >=2.50 developments.

    The IBM JDK works well too, but almost all the developers use Sun's version. It is therefore the recommended one.

    Apache Ant

    Follow the installation steps to set up the Apache Ant. Since version 2.50 Ant needs its memory settings to be tweaked. Otherwise some basic tasks like a compilation are likely to fail. Assuming you are using Bash as your shell, append the following line to your ~/.bashrc file:

    export ANT_OPTS="-Xmx1024M"

    For 64bit machines:

    export ANT_OPTS="-Xmx1024M -XX:MaxPermSize=128M"

    See the Apache Tomcat section for an explanation of what these options mean.

    Close your current shell session and open a new one to apply changes.

    Apache Tomcat

    Do not use the Tomcat version provided by your operating system's package manager. The packaged version of Tomcat is very unfriendly in terms of development due to web application deployment specifics. This especially applies to Linux distributions.

    Instead, download the official distribution (version 6.0.x), and extract the files in your home directory. We recommend you to place it in ~/servers/tomcat.

    Every Linux distribution and operating system packages Tomcat in a different way, with different security settings, permissions, memory setting and logging configuration. Some of these configurations are not development friendly. This is the reason of the recommendation to use the official distribution.

    The default memory settings of Tomcat are not enough for a proper Openbravo ERP functioning. Thus append the following line to your ~/.bashrc

    export CATALINA_OPTS="-Djava.awt.headless=true -Xms384M -Xmx512M -XX:MaxPermSize=256M"
    • -Djava.awt.headless: this setting controls running the environment with a headless implementation. In Openbravo ERP the client is always a web browser, so the JVM does not need to run any graphical window at all.
    • -Xms: this setting controls the initial size of the Java heap. Properly tuning this parameter reduces the overhead of garbage collection, improving server response time and throughput.
    • -Xmx: this setting controls the maximum size of the Java heap. Properly tuning this parameter reduces the overhead of garbage collection, improving server response time and throughput.
    • -XX:MaxPermSize: this setting controls the section of the heap reserved for the permanent generation, and holds all of the reflective data for the JVM.

    These options are the same ones as for production environment, except for the -server option. This is useful only in production servers, because it makes the JVM to use the optimizing compiler instead of the standard one. And while this change increases significantly the performance of the server, it takes longer to warm up. And deployment speed is something that a developer appreciates.

    In order to avoid the Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK error when trying to compile the application from Tomcat using the Openbravo ERP web interface, add the tools.jar library to Tomcat's classpath:

    cp $JAVA_HOME/lib/tools.jar ~/servers/tomcat/lib/

    In order to avoid Tomcat from auto-reloading itself, comment the WatchedResource line in conf/context.xml:

    <!-- <WatchedResource>WEB-INF/web.xml</WatchedResource> -->

    Configure a username and password for the Tomcat Manager, by replacing the conf/tomcat-users.xml file with these contents:

    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
    <role rolename="manager"/>
    <role rolename="admin"/>
    <user username="admin" password="admin" roles="admin,manager"/>
    </tomcat-users>

    Replace password="admin" with your own password.

    Finally, to start and stop tomcat use the following commands:

    cd ~/servers/tomcat/bin
    ./startup.sh
    ./shutdown.sh

    Mercurial

    Follow the Mercurial manual for Openbravo developers to install and configure it.



    posted on 2010-12-31 08:31 Ke 閱讀(786) 評論(0)  編輯  收藏 所屬分類: Openbravo
    主站蜘蛛池模板: 亚洲国产香蕉碰碰人人| 亚洲AV永久无码精品成人| 无码国产精品一区二区免费模式 | 亚洲爱情岛论坛永久| 免费中文字幕一级毛片| 最近中文字幕无免费视频| 最近最新高清免费中文字幕 | 亚洲中文无码a∨在线观看| 自拍偷自拍亚洲精品被多人伦好爽| 成人性生交大片免费看无遮挡| 久久久久高潮毛片免费全部播放 | 国内精品免费视频精选在线观看| 曰批全过程免费视频免费看 | 国产伦精品一区二区免费| 色多多免费视频观看区一区| 黄色a三级三级三级免费看| 国产产在线精品亚洲AAVV| 无套内谢孕妇毛片免费看看| 一个人看的免费观看日本视频www| 好湿好大好紧好爽免费视频| 国产乱子伦精品免费视频| 久青草视频在线观看免费| 久久精品国产免费一区| 1000部无遮挡拍拍拍免费视频观看| 国产精品色拉拉免费看| 波多野结衣一区二区免费视频| 亚洲色婷婷综合开心网| 亚洲av日韩av激情亚洲| 日韩亚洲不卡在线视频中文字幕在线观看| 亚洲情A成黄在线观看动漫软件| 国产偷国产偷亚洲高清人| 16女性下面扒开无遮挡免费| 亚洲?V无码成人精品区日韩| 亚洲资源在线观看| 白白色免费在线视频| 免费黄色福利视频| 久久精品国产亚洲7777| 67194在线午夜亚洲| 久久免费美女视频| www.亚洲色图.com| 91亚洲国产成人久久精品 |