1 ========================================
2 Getting started with OpenERP development
3 ========================================
8 Installation from sources
9 ==========================
11 .. _getting_started_installation_source-link:
13 Source code is hosted on Launchpad_. In order to get the sources, you will need Bazaar_ to pull the source from Launchpad. Bazaar is a version control system that helps you track project history over time and collaborate efficiently. You may have to create an account on Launchpad to be able to collaborate on OpenERP development. Please refer to the Launchpad and Bazaar documentation to install and setup your development environment.
15 The running example of this section is based on an Ubuntu environment. You may have to adapt the steps according to your system. Once your working environment is ready, prepare a working directory that will contain the sources. For a ``source`` base directory, type::
17 mkdir source;cd source
19 OpenERP provides a setup script that automatizes the tasks of creating a shared repository and getting the source code. Get the setup script of OpenERP by typing::
21 bzr cat -d lp:~openerp-dev/openerp-tools/trunk setup.sh | sh
23 This will create the following two files in your ``source`` directory::
25 -rw-rw-r-- 1 openerp openerp 5465 2012-04-17 11:05 Makefile
26 -rw-rw-r-- 1 openerp openerp 2902 2012-04-17 11:05 Makefile_helper.py
28 If you want some help about the available options, please type::
32 Next step is to initialize the shared repository and download the sources. Get the current trunk version of OpenERP by typing::
36 This will create the following structure inside your ``source`` directory, and fetch the latest source code from ``trunk``::
38 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 addons
39 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 misc
40 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 server
41 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 web
43 Some dependencies are necessary to use OpenERP. Depending on your environment, you might have to install the following packages::
45 sudo apt-get install \
74 Next step is to initialize the database. This will create a new openerp role::
78 Finally, launch the OpenERP server::
82 Testing your installation can be done on http://localhost:8069/ . You should see the OpenERP main login page.
84 .. _Launchpad: https://launchpad.net/
85 .. _Bazaar: http://bazaar.canonical.com/en/
92 ./openerp-server --help
94 gives you the available command line options. For OpenERP server at revision 4133, an output example is given in the `Command line options example`_. Here are a few interesting command line options.
101 --version show program version number and exit
102 -h, --help show this help message and exit
103 -c CONFIG, --config=CONFIG specify alternate config file
104 -s, --save save configuration to ~/.terp_serverrc
105 -v, --verbose enable debugging
106 --pidfile=PIDFILE file where the server pid will be stored
107 --logfile=LOGFILE file where the server log will be stored
108 -n INTERFACE, --interface=INTERFACE specify the TCP IP address
109 -p PORT, --port=PORT specify the TCP port
110 --net_interface=NETINTERFACE specify the TCP IP address for netrpc
111 --net_port=NETPORT specify the TCP port for netrpc
112 --no-netrpc disable netrpc
113 --no-xmlrpc disable xmlrpc
114 -i INIT, --init=INIT init a module (use "all" for all modules)
115 --without-demo=WITHOUT_DEMO load demo data for a module (use "all" for all modules)
116 -u UPDATE, --update=UPDATE update a module (use "all" for all modules)
117 --stop-after-init stop the server after it initializes
118 --debug enable debug mode
119 -S, --secure launch server over https instead of http
120 --smtp=SMTP_SERVER specify the SMTP server for sending mail
122 Database related options
123 ++++++++++++++++++++++++
127 -d DB_NAME, --database=DB_NAME
128 specify the database name
129 -r DB_USER, --db_user=DB_USER
130 specify the database user name
131 -w DB_PASSWORD, --db_password=DB_PASSWORD
132 specify the database password
133 --pg_path=PG_PATH specify the pg executable path
134 --db_host=DB_HOST specify the database host
135 --db_port=DB_PORT specify the database port
137 Internationalization options
138 ++++++++++++++++++++++++++++
140 Use these options to translate OpenERP to another language.See i18n section of the user manual. Option '-l' is mandatory.::
142 -l LANGUAGE, --language=LANGUAGE
143 specify the language of the translation file. Use it
144 with --i18n-export and --i18n-import
145 --i18n-export=TRANSLATE_OUT
146 export all sentences to be translated to a CSV file
148 --i18n-import=TRANSLATE_IN
149 import a CSV file with translations and exit
150 --modules=TRANSLATE_MODULES
151 specify modules to export. Use in combination with
154 Options from previous versions
155 ++++++++++++++++++++++++++++++
157 Some options were removed in OpenERP version 6. For example, ``price_accuracy`` is now
158 configured through the :ref:`decimal_accuracy` screen.
163 .. _getting_started_configuration-link:
165 Two configuration files are available:
167 * one for the client: ``~/.openerprc``
168 * one for the server: ``~/.openerp_serverrc``
170 If they are not found, the server and the client will start with a default configuration. Those files follow the convention used by python's ConfigParser module. Please note that lines beginning with "#" or ";" are comments. The client configuration file is automatically generated upon the first start. The sezrver configuration file can automatically be created using the command ::
172 ./openerp-server -s or ./openerp-server --save
174 You can specify alternate configuration files with ::
176 -c CONFIG, --config=CONFIG specify alternate config file
178 Configure addons locations
179 --------------------------
181 By default, the only directory of addons known by the server is server/bin/addons.
182 It is possible to add new addons by
184 - copying them in server/bin/addons, or creating a symbolic link to each
185 of them in this directory, or
186 - specifying another directory containing addons to the server. The later
187 can be accomplished either by running the server with the ``--addons-path=``
188 option, or by configuring this option in the openerp_serverrc file,
189 automatically generated under Linux in your home directory by the
190 server when executed with the ``--save`` option. You can provide several
191 addons to the ``addons_path`` = option, separating them using commas.
196 .. versionadded:: 6.1
198 To run the OpenERP server, the conventional approach is to use the
199 `openerp-server` script. It loads the :ref:`openerp library`, sets a few
200 configuration variables corresponding to command-line arguments, and starts to
201 listen to incoming connections from clients.
203 Depending on your deployment needs, you can write such a start-up script very
204 easily. We also recommend you take a look at an alternative tool called
205 `openerp-command` that can, among other things, launch the server.
207 Yet another alternative is to use a WSGI-compatible HTTP server and let it call
208 into one of the WSGI entry points of the server.