This question has been flagged
2 Replies
8451 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.
 

Avatar
Discard

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

Best Answer

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

Avatar
Discard
Author

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.

Best Answer

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 ?

Avatar
Discard
Author

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.

-----------------

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
Author

Ok, so what is your script?

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