Installation Of OpenERP Server 5.0, OpenERP GTK Client 5.0 And OpenERP Web Client 5.0.1 On Ubuntu Server 9.04 - Page 3

Want to support HowtoForge? Become a subscriber!
 
Submitted by linuxunixmadrid (Contact Author) (Forums) on Wed, 2009-06-24 16:38. :: Other | Other

HTTPS with Apache

$ sudo apt-get install apache2

$ sudo a2enmod ssl

$ sudo a2ensite default-ssl

$ sudo /etc/init.d/apache2 restart

 

Forcing Apache to redirect HTTP traffic to HTTPS

Choose a ServerName/URL for your OpenERP Web service, like openerpweb.com:

$ sudo vi /etc/apache2/sites-available/default

<VirtualHost *:80>
ServerName openerpweb.com
 Redirect / https://openerpweb.com/
 ...
 ...
</VirtualHost>

$ sudo a2enmod proxy

$ sudo a2enmod proxy_http

$ sudo a2enmod proxy_connect

$ sudo a2enmod proxy_ftp

Add your server’s IP address and URL in /etc/hosts:

$ sudo vi /etc/hosts

Replace

127.0.0.1       localhost 
127.0.1.1       yourhostname

With

127.0.0.1     localhost
192.168.x.x   openerpweb.com yourhostname

$ sudo vi /etc/apache2/sites-available/default-ssl

<VirtualHost *:443>
 ServerAdmin webmaster@localhost
 ServerName openerpweb.com
<Proxy *>
 Order deny,allow
 Allow from all
</Proxy>
 ProxyRequests Off
 ProxyPass        /   http://127.0.0.1:8080/
 ProxyPassReverse /   http://127.0.0.1:8080/
 ...
</VirtualHost>

Restart Apache:

$ sudo /etc/init.d/apache2 restart

Check out your URL with a browser: http://openerpweb.com.

 

Block OpenERP Web server port 8080 with a firewall

Do it locally as the first command will close all the existing ssh connections:

$ sudo ufw enable

$ sudo ufw allow ssh

$ sudo ufw allow http

$ sudo ufw allow https

Add the following lines:

Ubuntu Server 9.0.4:

$ sudo vi /etc/openerp-web.cfg

Ubuntu Desktop 9.0.4:

$ sudo vi /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/config/default.cfg

base_url_filter.on = True
base_url_filter.use_x_forwarded_host = False
base_url_filter.base_url = "https://www.example.com"

!Be careful with the quotation marks in config files like the last one! if you copy and paste, be sure the text you copy from is preformatted or you might not be able to start openerp-web INIT script (/etc/init.d/openerp-web start). The previous three lines have been preformatted. Type the quotation marks if you encounter problems or you want to be sure.

Restart openerp-web:

$ sudo /etc/init.d/openerp-web restart

Check out again your server’s URL http://openerpweb.com.

Administrator: admin / openerp

Demo user: demo / demo

Restart the server with “sudo init 6” and make sure that all the openerp processes are started automatically as non-root.

 

References & Demo Server

OpenERP Video guides can be found at http://www.openerp.tv.

Demonstrations (Login: demo / Password: demo): http://openerp.com/en/discover/demonstration.html

Open Object is an open source Rapid Application Development framework in Python: http://openobject.com

Another demo server can be found at https://openerp.zikzakmedia.com , with the following users and passwords:

demobase/demobase
demoventas/demoventas
democompras/democompras
democonta/democonta

Open ERP Spain: http://www.openerpspain.com/

Open ERP Site (Spanish) http://www.openerpsite.com/

Open ERP modules for Spain (a must read): http://www.openerpsite.com/modulos-de-localizacion-espanola/322.html

How to download modules and latest versions from Launchpad (in Spanish) http://www.openerpsite.com/proyectos-openerp

Install extra modules: http://openerpwiki.citrusconsultants.com/wiki/index.php/Install_extra_modules

Global Module Index: http://doc.openerp.com/modindex.html

Another real budget (in Spanish, a must read): http://www.openerpsite.com/otro-presupuesto-real/416.html

Useful advices (in Spanish, a must read): http://www.openerpsite.com/consejos

Original article written by the author can be found at http://opensourceconsulting.wordpress.com/2009/06/17/installation-of-openerp-server-5-0-openerp-gtk-client-5-0-and-openerp-web-client-5-0-1-on-ubuntu-server-9-0-4/ 

SHELL SCRIPT TO AUTOMATE THE INSTALLATION OF OPENERP-SERVER 5.0 WITH OPENERP-WEB 5.0.1 ON UBUNTU 9.0.4

A Shell script written by the author eases and automates the installation of openerp-server 5.0 with openerp-web 5.0.1 for Ubuntu 9.0.4: http://opensourceconsulting.wordpress.com/2009/06/29/openerp-server-5-0-openerp-web-5-0-1-installation-script-on-ubuntu-9-0-4-sh/

FAQ

1. start-openerp-web fails with the following error:

$ sudo -u openerp start-openerp-web

or

$ start-openerp-web
Traceback (most recent call last):
  File "/usr/bin/start-openerp-web", line 8, in <module>
    load_entry_point('openerp-web==5.0.1-0', 'console_scripts', 'start-openerp-web')()
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/openerp/commands.py", line 58, in start
    turbogears.update_config(configfile=configfile, modulename="openerp.config")
  File "/usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/config.py", line 207, in update_config
    configdict = config_obj(configfile, modulename).dict()
  File "/usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/config.py", line 193, in config_obj
    configdata2 = ConfigObj(configfile, unrepr=True)
  File "build/bdist.linux-x86_64/egg/configobj.py", line 1219, in __init__
  File "build/bdist.linux-x86_64/egg/configobj.py", line 1302, in _load
configobj.UnreprError: Parse error in value at line 27.

Workaround: This could happen once openerp-web has already been run for first time through the INIT script. As this means that the INIT script works, just launch openerp-web with "sudo /etc/init.d/openerp-web start"

2. start-openerp-web fails with the error: Can't extract file(s) to egg cache

$ start-openerp-web

File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 887, in extraction_error                                                                                 raise err
pkg_resources.ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg cache:
[Errno 13] Permission denied: '/home/user/.python-eggs'
The Python egg cache directory is currently set to:
    /home/user/.python-eggs
Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory.

Solution:

$ sudo -u openerp PYTHON_EGG_CACHE=/home/openerp/.python-eggs/ start-openerp-web


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Michal (not registered) on Sat, 2009-08-15 18:41.
Great tutorial!
Submitted by hu (not registered) on Sun, 2009-07-19 00:53.

When I create a new database, just displays the time out, connection fail.

How can I fix it?

Submitted by SaafWater (not registered) on Mon, 2009-06-29 12:18.
What a fantastic guide - thank you for taking the time - I really appreciate it.
Submitted by Cingcay (not registered) on Sat, 2009-06-27 03:10.

Very usefull tutorial. I followed all instruction and seem everything works except the openerp-web. Everytime I run start-openerp-web, I got the following warning and error:

administrator@ubser9:/usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg$ start-openerp-web
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/__init__.py:98: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/predicates.py:239: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/predicates.py:263: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/predicates.py:281: Warning: 'as' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
  File "/usr/bin/start-openerp-web", line 8, in <module>
    load_entry_point('openerp-web==5.0.1-0', 'console_scripts', 'start-openerp-web')()
  File "/usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/openerp/commands.py", line 58, in start
    turbogears.update_config(configfile=configfile, modulename="openerp.config")
  File "/usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/config.py", line 207, in update_config
    configdict = config_obj(configfile, modulename).dict()
  File "/usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/config.py", line 193, in config_obj
    configdata2 = ConfigObj(configfile, unrepr=True)
  File "build/bdist.linux-i686/egg/configobj.py", line 1219, in __init__
  File "build/bdist.linux-i686/egg/configobj.py", line 1302, in _load
configobj.UnreprError: Parse error in value at line 65.
administrator@ubser9:/usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg$

Submitted by john (not registered) on Sat, 2009-07-11 00:46.

I get similar error... running Ubuntu 9.04 Server

 sudo -u openerp start-openerp-web
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/__init__.py:98: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/predicates.py:239: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/predicates.py:263: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/predicates.py:281: Warning: 'as' will become a reserved keyword in Python 2.6