3
.. i18n: single: Installation; OpenERP Web (Linux)
4
.. i18n: single: OpenERP Web; Installation (Linux)
9
single: Installation; OpenERP Web (Linux)
10
single: OpenERP Web; Installation (Linux)
13
.. i18n: .. _installation-linux-web-link:
15
.. i18n: ===============================================================================
16
.. i18n: OpenERP Web Installation
17
.. i18n: ===============================================================================
20
.. _installation-linux-web-link:
22
===============================================================================
23
OpenERP Web Installation
24
===============================================================================
26
.. i18n: Here is the installation instructions for Debian based Linux distributions.
27
.. i18n: Tested on Debian Etch and Ubuntu Hardy. The procedure might work with other
28
.. i18n: Linux or similar distributions. See the docs on how to install the specified
29
.. i18n: Packages on your favourite distro.
32
Here is the installation instructions for Debian based Linux distributions.
33
Tested on Debian Etch and Ubuntu Hardy. The procedure might work with other
34
Linux or similar distributions. See the docs on how to install the specified
35
Packages on your favourite distro.
37
.. i18n: -------------------------------------------------------------------------------
38
.. i18n: Prerequisites
39
.. i18n: -------------------------------------------------------------------------------
42
-------------------------------------------------------------------------------
44
-------------------------------------------------------------------------------
46
.. i18n: #. Python >= 2.4
47
.. i18n: #. CherryPy >= 3.1.2
48
.. i18n: #. Mako >= 0.2.4
49
.. i18n: #. Babel >= 0.9.4
50
.. i18n: #. FormEncode >= 1.2.2
51
.. i18n: #. simplejson >= 2.0.9
52
.. i18n: #. pyparsing >= 1.5.0
54
.. i18n: Remember, this version requires CherryPy3 which is conflicting with
55
.. i18n: CherryPy2 (used by TurboGears), so you can't install both in system area.
56
.. i18n: To overcome with the issue, we added support for local library installation
57
.. i18n: for OpenERP Web. In that case, just download the source package and do the
65
#. FormEncode >= 1.2.2
66
#. simplejson >= 2.0.9
69
Remember, this version requires CherryPy3 which is conflicting with
70
CherryPy2 (used by TurboGears), so you can't install both in system area.
71
To overcome with the issue, we added support for local library installation
72
for OpenERP Web. In that case, just download the source package and do the
75
.. i18n: -------------------------------------------------------------------------------
77
.. i18n: -------------------------------------------------------------------------------
80
-------------------------------------------------------------------------------
82
-------------------------------------------------------------------------------
84
.. i18n: .. code-block:: bash
86
.. i18n: $ sudo apt-get install python python-dev build-essential
87
.. i18n: $ sudo apt-get install python-setuptools
92
$ sudo apt-get install python python-dev build-essential
93
$ sudo apt-get install python-setuptools
95
.. i18n: This will install dependencies required for the following
98
This will install dependencies required for the following
100
.. i18n: .. code-block:: bash
102
.. i18n: $ cd /path/to/openerp-web/lib
103
.. i18n: $ ./populate.sh
109
$ cd /path/to/openerp-web/lib
113
.. i18n: This will install all required dependencies in private lib directory, and you
114
.. i18n: don't need to install anything...
117
This will install all required dependencies in private lib directory, and you
118
don't need to install anything...
120
.. i18n: -------------------------------------------------------------------------------
121
.. i18n: OpenERP Web Client
122
.. i18n: -------------------------------------------------------------------------------
125
-------------------------------------------------------------------------------
127
-------------------------------------------------------------------------------
129
.. i18n: .. code-block:: bash
131
.. i18n: $ sudo easy_install -U openerp-web
136
$ sudo easy_install -U openerp-web
138
.. i18n: all other dependencies will be installed automatically by setuptools...
141
all other dependencies will be installed automatically by setuptools...
143
.. i18n: -------------------------------------------------------------------------------
144
.. i18n: Configuration
145
.. i18n: -------------------------------------------------------------------------------
148
-------------------------------------------------------------------------------
150
-------------------------------------------------------------------------------
152
.. i18n: Locate the *config/default.cfg* in the installed *EGG*, and make appropriate
153
.. i18n: changes, especially:
156
Locate the *config/default.cfg* in the installed *EGG*, and make appropriate
159
.. i18n: .. code-block:: ini
162
.. i18n: server = "localhost"
164
.. i18n: protocol = "socket"
179
.. i18n: * ``server`` is the OpenERP server host
181
.. i18n: * ``port`` is the OpenERP server port which is by default 8070 for NET-RPC or 8069 for XML(S)-RPC.
182
.. i18n: The web server itself listens by default on port 8080 and connects to the OpenERP server
183
.. i18n: using one of the above-mentioned ports.
184
.. i18n: The final web browser connects to the Web server, so usually port 8080.
186
.. i18n: * ``protocol`` is the protocol to be used (``socket`` for NET-RPC, ``http`` for XML-RPC or ``https`` for XMLS-RPC)
189
* ``server`` is the OpenERP server host
191
* ``port`` is the OpenERP server port which is by default 8070 for NET-RPC or 8069 for XML(S)-RPC.
192
The web server itself listens by default on port 8080 and connects to the OpenERP server
193
using one of the above-mentioned ports.
194
The final web browser connects to the Web server, so usually port 8080.
196
* ``protocol`` is the protocol to be used (``socket`` for NET-RPC, ``http`` for XML-RPC or ``https`` for XMLS-RPC)
198
.. i18n: Now start the web server with ``openerp-web`` command:
201
Now start the web server with ``openerp-web`` command:
203
.. i18n: .. code-block:: bash
205
.. i18n: $ openerp-web
212
.. i18n: If you see message showing ``IOError: Port 8080 not free on '0.0.0.0'`` make
213
.. i18n: sure no other application is running on the specified port (8080 is default).
216
If you see message showing ``IOError: Port 8080 not free on '0.0.0.0'`` make
217
sure no other application is running on the specified port (8080 is default).
219
.. i18n: You can change port by changing ``server.socket_port`` value in
220
.. i18n: ``config/openerp-web.cfg``.
223
You can change port by changing ``server.socket_port`` value in
224
``config/openerp-web.cfg``.
226
.. i18n: If everything is fine, open your favourite web browser and type
227
.. i18n: http://localhost:8080/, and your can see welcome page with login screen.
230
If everything is fine, open your favourite web browser and type
231
http://localhost:8080/, and your can see welcome page with login screen.
233
.. i18n: Please make sure cookies are enabled in your browser.
236
Please make sure cookies are enabled in your browser.
238
.. i18n: Of course, OpenERP Server must be running at that time. You should create a
239
.. i18n: database from the DBAdmin interface by clicking on Databases button that you can
240
.. i18n: see on the login screen. After creating a new database, login with the
241
.. i18n: admin/admin or demo/demo user to see OpenERP in action...
244
Of course, OpenERP Server must be running at that time. You should create a
245
database from the DBAdmin interface by clicking on Databases button that you can
246
see on the login screen. After creating a new database, login with the
247
admin/admin or demo/demo user to see OpenERP in action...
249
.. i18n: .. warning::
251
.. i18n: Please make sure that the system time is properly set otherwise web browsers
252
.. i18n: might fail to establish sessions. We strongly recommend you to synchronize
253
.. i18n: system clock with NTP...
258
Please make sure that the system time is properly set otherwise web browsers
259
might fail to establish sessions. We strongly recommend you to synchronize
260
system clock with NTP...
262
.. i18n: -------------------------------------------------------------------------------
263
.. i18n: Run as service (daemon)
264
.. i18n: -------------------------------------------------------------------------------
267
-------------------------------------------------------------------------------
268
Run as service (daemon)
269
-------------------------------------------------------------------------------
271
.. i18n: This has been tested on *ubuntu* only.To run openerp Web as a service you need to first locate the openerp_web-5.0.0-py2.5.egg ad copy the openerp-web file to etc/init.d/. An egg is a python package. "Eggs are to Pythons as Jars are to Java...".You can find the documentation about eggs at http://peak.telecommunity.com/DevCenter/PythonEggs
272
.. i18n: The location of the egg depends on your distribution.
273
.. i18n: For example path to openerp_web-5.0.6-py2.5.egg in Ubuntu 8.10 is:
276
.. i18n: /usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/
279
This has been tested on *ubuntu* only.To run openerp Web as a service you need to first locate the openerp_web-5.0.0-py2.5.egg ad copy the openerp-web file to etc/init.d/. An egg is a python package. "Eggs are to Pythons as Jars are to Java...".You can find the documentation about eggs at http://peak.telecommunity.com/DevCenter/PythonEggs
280
The location of the egg depends on your distribution.
281
For example path to openerp_web-5.0.6-py2.5.egg in Ubuntu 8.10 is:
284
/usr/lib/python2.5/site-packages/openerp_web-5.0.6-py2.5.egg/
286
.. i18n: .. code-block:: bash
288
.. i18n: $ sudo cp /path/to/openerp_web-5.0.0-py2.5.egg/scripts/openerp-web /etc/init.d/
289
.. i18n: $ sudo cp /path/to/openerp_web-5.0.0-py2.5.egg/config/openerp-web.cfg /etc/
290
.. i18n: $ sudo chmod +x /etc/init.d/openerp-web
295
$ sudo cp /path/to/openerp_web-5.0.0-py2.5.egg/scripts/openerp-web /etc/init.d/
296
$ sudo cp /path/to/openerp_web-5.0.0-py2.5.egg/config/openerp-web.cfg /etc/
297
$ sudo chmod +x /etc/init.d/openerp-web
299
.. i18n: edit */etc/init.d/openerp-web* using any editor example:
302
edit */etc/init.d/openerp-web* using any editor example:
304
.. i18n: .. code-block:: bash
306
.. i18n: $ sudo gedit /etc/init.d/openerp-web
311
$ sudo gedit /etc/init.d/openerp-web
313
.. i18n: .. code-block:: ini
315
.. i18n: USER="your system username"
320
USER="your system username"
322
.. i18n: and edit */etc/openerp-web.cfg*:
325
and edit */etc/openerp-web.cfg*:
327
.. i18n: .. code-block:: bash
329
.. i18n: $ sudo gedit /etc/openerp-web.cfg
334
$ sudo gedit /etc/openerp-web.cfg
336
.. i18n: .. code-block:: ini
338
.. i18n: log.access_file = "/var/log/openerp-web/access.log"
339
.. i18n: log.error_file = "/var/log/openerp-web/error.log"
344
log.access_file = "/var/log/openerp-web/access.log"
345
log.error_file = "/var/log/openerp-web/error.log"
347
.. i18n: Create ``/var/log/openerp-web/`` with proper ownership
350
Create ``/var/log/openerp-web/`` with proper ownership
352
.. i18n: .. code-block:: bash
354
.. i18n: $ sudo mkdir /var/log/openerp-web/
355
.. i18n: $ sudo chown username /var/log/openerp-web/
360
$ sudo mkdir /var/log/openerp-web/
361
$ sudo chown username /var/log/openerp-web/
363
.. i18n: Now run following command to start the OpenERP Web automatically on system
364
.. i18n: startup (Debian/Ubuntu).
367
Now run following command to start the OpenERP Web automatically on system
368
startup (Debian/Ubuntu).
370
.. i18n: .. code-block:: bash
372
.. i18n: $ sudo update-rc.d openerp-web defaults
377
$ sudo update-rc.d openerp-web defaults
379
.. i18n: Start the deamon:
384
.. i18n: .. code-block:: bash
386
.. i18n: $ sudo /etc/init.d/openerp-web start
391
$ sudo /etc/init.d/openerp-web start
395
.. i18n: The init script is compatible with all major Linux distributions. Please
396
.. i18n: check docs of your distribution on how to enable services.
401
The init script is compatible with all major Linux distributions. Please
402
check docs of your distribution on how to enable services.
404
.. i18n: -------------------------------------------------------------------------------
405
.. i18n: Configure HTTPS
406
.. i18n: -------------------------------------------------------------------------------
409
-------------------------------------------------------------------------------
411
-------------------------------------------------------------------------------
413
.. i18n: The following text describes how to configure OpenERP Web for production
414
.. i18n: environment over HTTPS with Apache2.
417
The following text describes how to configure OpenERP Web for production
418
environment over HTTPS with Apache2.
420
.. i18n: **mod_proxy + mod_ssl (Apache2)**
423
**mod_proxy + mod_ssl (Apache2)**
425
.. i18n: See `Apache manual <http://httpd.apache.org/docs/>`_ for more information.
428
See `Apache manual <http://httpd.apache.org/docs/>`_ for more information.
430
.. i18n: **Apache configuration**
433
**Apache configuration**
435
.. i18n: .. code-block:: apache
437
.. i18n: <VirtualHost *:443>
439
.. i18n: SSLEngine on
440
.. i18n: SSLCertificateFile /etc/apache2/ssl/apache.pem
443
.. i18n: Order deny,allow
444
.. i18n: Allow from all
447
.. i18n: ProxyRequests Off
449
.. i18n: ProxyPass / http://127.0.0.1:8080/
450
.. i18n: ProxyPassReverse / http://127.0.0.1:8080/
452
.. i18n: RequestHeader set "X-Forwarded-Proto" "https"
454
.. i18n: # Fix IE problem (http error 408/409)
455
.. i18n: SetEnv proxy-nokeepalive 1
457
.. i18n: </VirtualHost>
460
.. code-block:: apache
465
SSLCertificateFile /etc/apache2/ssl/apache.pem
474
ProxyPass / http://127.0.0.1:8080/
475
ProxyPassReverse / http://127.0.0.1:8080/
477
RequestHeader set "X-Forwarded-Proto" "https"
479
# Fix IE problem (http error 408/409)
480
SetEnv proxy-nokeepalive 1
484
.. i18n: **OpenERP Web configuration**
487
**OpenERP Web configuration**
489
.. i18n: .. code-block:: ini
491
.. i18n: tools.proxy.on = True
496
tools.proxy.on = True
498
.. i18n: **Block the OpenERP Web server port (firewall)**
501
**Block the OpenERP Web server port (firewall)**
503
.. i18n: .. code-block:: bash
505
.. i18n: $ iptables -A INPUT -i lo -j ACCEPT
506
.. i18n: $ iptables -A INPUT -p tcp --dport 8080 -j REJECT
511
$ iptables -A INPUT -i lo -j ACCEPT
512
$ iptables -A INPUT -p tcp --dport 8080 -j REJECT
516
.. i18n: Don't block the localhost/121.0.0.1 (the first rule)
521
Don't block the localhost/121.0.0.1 (the first rule)
525
.. i18n: This method only works if you want your OpenERP Web application at the
526
.. i18n: root of your server (https://www.example.com) and can't be deployed under
527
.. i18n: a subdirectory, e.g. http://www.example.com/openerp.
529
.. i18n: To overcome with the issue you can go with `subdomain`, like:
531
.. i18n: https://openerp.example.com
536
This method only works if you want your OpenERP Web application at the
537
root of your server (https://www.example.com) and can't be deployed under
538
a subdirectory, e.g. http://www.example.com/openerp.
540
To overcome with the issue you can go with `subdomain`, like:
542
https://openerp.example.com
544
.. i18n: -------------------------------------------------------------------------------
545
.. i18n: Web Browser Compatibilities
546
.. i18n: -------------------------------------------------------------------------------
549
-------------------------------------------------------------------------------
550
Web Browser Compatibilities
551
-------------------------------------------------------------------------------
553
.. i18n: Supported browsers
554
.. i18n: ++++++++++++++++++
560
.. i18n: *OpenERP Web* is known to work best with *Mozilla* based web browsers. Here is
561
.. i18n: the list of supported browsers.
564
*OpenERP Web* is known to work best with *Mozilla* based web browsers. Here is
565
the list of supported browsers.
567
.. i18n: #. Firefox >= 1.5
568
.. i18n: #. Internet Explorer >= 6.0
569
.. i18n: #. Safari >= 3.0
570
.. i18n: #. Google Chrome >= 1.0
571
.. i18n: #. Opera >= 9.0
575
#. Internet Explorer >= 6.0
577
#. Google Chrome >= 1.0
580
.. i18n: Flash plugin
581
.. i18n: ++++++++++++
587
.. i18n: Your browser should have the Flash plugin installed because *OpenERP Web* uses
588
.. i18n: some Flash components.
591
Your browser should have the Flash plugin installed because *OpenERP Web* uses
592
some Flash components.
594
.. i18n: Here is how to install the Flash plugin on an Ubuntu system:
597
Here is how to install the Flash plugin on an Ubuntu system:
599
.. i18n: .. code-block:: bash
601
.. i18n: $ sudo apt-get install flashplugin-nonfree
606
$ sudo apt-get install flashplugin-nonfree