Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Boot script for Openerp in virutalenv

By
Saulius
on 9/13/14, 1:08 PM 3,798 views

Hello,

Does anyone has a working boot script for Ubuntu when Openerp 7 were installed using virtualenv? Tried the sugested from installation without virtualenv, but it does not work.

I`ve managed to install Openerp 7 succesfully and can run it with a command line, but it would be better to run it as a service.
 

Hi, you can follow this, you will be able to install and run odoo without command. http://netbeam.in/blog/install-odooopenerp-on-linuxubuntudebian/

NetbeamERP Technology
on 9/13/14, 2:26 PM
0

To install Odoo to Ubuntu (Linux) from Github Repository . Follow These steps

1.Update sources list

sudo apt-get update

sudo apt-get upgrade

 

 

2. Install Postgresql and configure it

sudo adduser --system --home=/opt/openerp --group openerp

sudo apt-get install postgresql-9.2 git-core

sudo su postgres

password: XXXX

postgres@openerp-desktop:/$ createuser openerp

Shall the new role be a superuser? (y/n) y

 

 

 

3. Install Python dependency

sudo apt-get update

sudo apt-get install python-dateutil python-docutils

python-feedparser python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-

psycopg2 python-psutil python-pybabel python-pychart

python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber

python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi poppler-utils python-pip

python-babel python-feedparser python-reportlab-accel python-zsi python-openssl python-egenix-mxdatetime python-

jinja2 python-unittest2 python-mock python-docutils lptools make python-psutil python-gdata

 

 

 

4. Get lastest Odoo  from github repository

sudo apt-get install git

sudo git clone https://github.com/odoo/odoo.git

sudo chown -R openerp: odoo

 

 

 

5. Create Odoo Log file\

sudo mkdir /var/log/openerp

sudo chown -R openerp:root /var/log/openerp

 

 

 

6. Edit OpenERP (Odoo v8) configuration File

sudo cp /opt/openerp/odoo/setup/debian/openerp-server.conf /etc/openerp-server.conf

sudo chown openerp: /etc/openerp-server.conf

sudo nano /etc/openerp-server.conf

#Copy and paste below content in config file , write correct addons paths

 

[options] ; This is the password that allows database operations:
admin_passwd = PASSWORD
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /opt/odoo/v8/addons,/opt/odoo/v8/web/addons
;Log settings
logfile = /var/log/openerp/openerp-server.log
log_level = error

 

 

 

 

7. SetUp OpenERP service file

sudo cp /opt/openerp/odoo/openerp-server /etc/init.d/openerp-server

sudo chmod 755 /etc/init.d/openerp-server

sudo chown root: /etc/init.d/openerp-server

sudo update-rc.d openerp-server defaults

sudo service openerp-server start

 

 

 

8. Start Openerp Server

cd /opt/openerp/odoo

./openerp-server

Now open link in your browser (localhost:8069)

or we can also run it on another port

./openerp-server –xmlrpc-port=9090

then localhost:9090

Thank you, but as I understand Odoo 8 is not finished, so it would not be good for production (thats why I choose Openerp 7). Also I want to launch multiple Odoo instances for different clients and it could be done using virtualenv.

Saulius
on 9/15/14, 3:54 AM
0
Dominique Chabord
On 9/14/14, 2:43 PM

NetbeamERP Technology: It seems you read the question a bit too fast. It is related to V7 and virtualenv and the proposed instructions will obviously fail.

Saulius: Yes you can use virrualenv with OpenERP 7. I do support it in my hosting scripts. You can also use Anybox recipe to get your environment up. When you say "it doesn't work", what do you mean ?  Do you know how to set virtualenv (and you'e discovered a problem on a package) or just giving a try (and don't know how to get it working) ?

What is the relation between virtualenv and the fact that you want to start it as a service ?

I`ve a client in /var/www/vhosts/website.com/ . Created here a virtualenv odoo (website.com/odoo/). Put an Openerp 7 here and installed it (python setup.py install). So I have a virtualenv /var/www/vhosts/website.com/odoo/ and an Odoo /var/www/vhosts/website.com/odoo/openerp7/ . If I run openerp7 as a user 'openerp-server --config=myconfig.conf' - it works. But if I use boot script: /website/com/odoo/etc/init.d/openerp start/ It creates a pid but service is not started. so 'openerp status' says 'stopped'. I`m using the boot script from here: http://www.theopensourcerer.com/wp-content/uploads/2012/12/openerp-server and just modified it so it would start an openerp 7 from my client`s folder.

Saulius
on 9/15/14, 3:51 AM
-----------------

I cannot edit on the forum 500 error :-(

If you use virtualenv, I guess it is to separate python environment
from the system.

- If you use apt-get to install dependencies, you don't and you have
to declare that in your environment : --system-site-packages. I guess
you did.

- To start openerp in the environment, either you activate it, or you
start the embeded python : /path_to_environment/python my_start_script

- And Allan's script doesn't, so you must modify it to manage environments.

- Why do you bother with environment ? If you plan to use several
environments for several openerp separate, it is a bit more complex
and my script might be useful to you (else it is too complex).

2014-09-15 9:51 GMT+02:00 Saulius <saulius@mail.odoo.com>:
> I`ve a client in /var/www/vhosts/website.com/ . Created here a virtualenv
> odoo (website.com/odoo/). Put an Openerp 7 here and installed it (python
> setup.py install). So I have a virtualenv /var/www/vhosts/website.com/odoo/
> and an Odoo /var/www/vhosts/website.com/odoo/openerp7/ . If I run openerp7
> as a user 'openerp-server --config=myconfig.conf' - it works. But if I use
> boot script: /website/com/odoo/etc/init.d/openerp start/ It creates a pid
> but service is not started. so 'openerp status' says 'stopped'. I`m using
> the boot script from here:
> http://www.theopensourcerer.com/wp-content/uploads/2012/12/openerp-server
> and just modified it so it would start an openerp 7 from my client`s folder.
>
> --
> Saulius
> Sent by Odoo Inc. using Odoo about Forum Post False
SISalp
on 9/15/14, 4:22 AM

Ok, so what is your script?

Saulius
on 9/15/14, 6:37 AM
Hello

the script can be downloaded here :
http://download.sisalp.net/xoe

here is a starter to get it installed and set
https://docs.google.com/document/d/1lKIHZcc3TFOUrjQebQ-sVyQ000mIv9gkxJSbCt0JQjE/edit?usp=sharing

In this minimal installation, xoe is configurerd to use environments
with Tryton, and not with OpenERP, but you can edit xoe configuration
to use environments for OpenERP too
Someone reported problems on Ubuntu 14.04 regarding apt-get install of
dependencies.
Ubuntu 14.04 is not enough tested because it is not yet in use on my
hosting and 12.04 is the standard I keep for OpenERP 7.0

2014-09-15 12:37 GMT+02:00 Saulius <saulius@mail.odoo.com>:
> Ok, so what is your script?
>
> --
> Saulius
> Sent by Odoo Inc. using Odoo about Forum Post False
SISalp
on 9/15/14, 11:39 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

4 follower(s)

Stats

Asked: 9/13/14, 1:08 PM
Seen: 3798 times
Last updated: 4/3/16, 10:45 AM