Skip to Content
Menu
This question has been flagged
10 Replies
15166 Views

This is My odoo installation directory not under opt folder

ubuntu-libu@ubuntulibu-OptiPlex-790:~/odoo$ ./odoo.py

I followed below steps and i can run odoo using terminal

.So please help me how to setup autostart odoo 8 without use terminal  , by explain a step by step decscription

  1. I have install Odoo on fresh installation of Ubuntu 14.04 from Github, So first I have installed git my system, to work with Github

    sudo apt-get install git

  2. Update apt source list

    sudo apt-get update

  3. Download and Install Updates

    sudo apt-get upgrade

  4. Install required packages for Odoo

    sudo apt-get install graphviz ghostscript postgresql-client \

    python-dateutil python-feedparser python-matplotlib \

    python-ldap python-libxslt1 python-lxml python-mako \

    python-openid python-psycopg2 python-pybabel python-pychart \

    python-pydot python-pyparsing python-reportlab python-simplejson \

    python-tz python-vatnumber python-vobject python-webdav \

    python-werkzeug python-xlwt python-yaml python-imaging

  5. Install supporting packages for Odoo

    sudo apt-get install gcc python-dev mc bzr python-setuptools 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-paramiko poppler-utils \

    python-pdftools antiword postgresql

  6. Install full Postgres database

    sudo apt-get install postgresql

  7. Create database user for Odoo

    sudo -u postgres createuser -s odoo

  8. Get / Install Odoo from Github to you system

    wget -O- https://raw.githubusercontent.com/odoo/odoo/master/odoo.py | python

  9. Now go to odoo folder where opeperp-server file resides. (This command may vary to your system, if you have specify different path for storing odoo project)

    cd odoo/odoo/

  10. Run server

    ./openerp-server

  11. Now I can access the openerp  using http://localhost:8069

 

 

from this blog  http://pulse7.net/openerp/install-odoo-ubuntu-14-04-github/

 

Avatar
Discard

Honestly, you should use an automated install script. The one from André Schenkels is amazing! See https://github.com/aschenkels-ictstudio/openerp-install-scripts/blob/master/odoo-v8/ubuntu-14-04/odoo_install.sh it will do a full Odoo install and will automate the start-up proces from Odoo too.

Author

I checked this blog ,but I want to know where can I run this script in terminal or somewhere .

Simply do a sudo nano odoo_install.py then paste the code in it. Make the file executable with sudo chmod +x odoo_install and the final step is to do ./odoo_install and it will install the whole Odoo with auto-boot.

Best Answer

Try This

1./ Create a conf file as below as per preferred location

    touch openerp-server.conf
    chmod 777 openerp-server.conf
    vi openerp-server.conf

 

Write the following content into it

[options]
; This is the password that allows database operations:
admin_passwd = <<adminpassword>>
db_host = False
db_port = False
db_user = <<dbuser>>
db_password = <<dbpassword>>
addons_path = <<addons path, comma separated if multiple location of addons including custom addons>>
xmlrpc_port = 8069
netrpc_port = 8071
;Log settings
;end of file

2./ Now create a Script file to run as  daemon in system

create file in /etc/init.d/ location
touch openerp-server  (without extension(.))
chmod 777 openerp-server
vi openerp-server

Write the following content into it

#starting of file
#!/bin/sh

### BEGIN INIT INFO
# Provides:             openerp-server
# Required-Start:       $remote_fs $syslog
# Required-Stop:        $remote_fs $syslog
# Should-Start:         $network
# Should-Stop:          $network
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    Enterprise Resource Management software
# Description:          Open ERP is a complete ERP and CRM software.
### END INIT INFO

PATH=/bin:/sbin:/usr/bin
DAEMON=<<location of openerp-server file>> example:- /opt/openerp7/openerp-7.0-20140321-001341/openerp-server7
NAME=openerp-server
DESC=openerp-server

# Specify the user name (Default: openerp).
USER=openerp

# Specify an alternate config file (Default: /etc/openerp-server.conf).
CONFIGFILE="<<your config file path created above>>"

# pidfile
PIDFILE=/var/run/$NAME.pid

# Additional options that are passed to the Daemon.
DAEMON_OPTS="-c $CONFIGFILE"

[ -x $DAEMON ] || exit 0
[ -f $CONFIGFILE ] || exit 0

checkpid() {
    [ -f $PIDFILE ] || return 1
    pid=`cat $PIDFILE`
    [ -d /proc/$pid ] && return 0
    return 1
}

case "${1}" in
        start)
                echo -n "Starting ${DESC}: "

                start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
                        --chuid ${USER} --background --make-pidfile \
                        --exec ${DAEMON} -- ${DAEMON_OPTS}

                echo "${NAME}."
                ;;

        stop)
                echo -n "Stopping ${DESC}: "

                start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
                        --oknodo

                echo "${NAME}."
                ;;

        restart|force-reload)
                echo -n "Restarting ${DESC}: "

                start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
                        --oknodo

                sleep 1

                start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
                        --chuid ${USER} --background --make-pidfile \
                        --exec ${DAEMON} -- ${DAEMON_OPTS}

                echo "${NAME}."
                ;;

        *)
                N=/etc/init.d/${NAME}
                echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
                exit 1
                ;;
esac

exit 0
#end of file

3./ Now just fire below command for set this file in AUTO START with above file name(here file name is: openerp-server)
You have to be at location /etc/init.d where you just created the daemon file

  •     sudo update-rc.d openerp-server

This command sets the file as daemon file, so whenever the system starts it starts the server so you can start the browser and you will find the server running, without starting it manually

4./ Then to start server when the system is already running i.e manully fire below command

  •     /ept/init.d/openerp-server start ----> to start the server
  •     /ept/init.d/openerp-server stop  ----> to stop the server
  •     /ept/init.d/openerp-server restart -----> to restart the server

Hope this helps !!

Avatar
Discard
Author

Hi Emipro Tech, Not openerp,I want to do it in odoo 8 not version 7

This configuration doesn't relate to openerp7 or odoo. Its the matter of creating a daemon file which will run/execute particular file.

Author

This is the installation directory of odoo .So any change in above script please et me knowubuntu-libu@ubuntulibu-OptiPlex-790:~/odoo$ ./odoo.py

@Libu ...... sorry didn't got you, what you are trying say. Can you brief it again about the script.

Hi,

May I know How to make it with ODOO 9, Enterprise edition.

Best Answer


I followed this link from open ERP to install odoo

https://www.getopenerp.com/easy-odoo8-installation/

Now odoo runs perfectly by entering following command

cd /opt/openerp/odoo./openerp-serverProblem is i cannot stop the service . Also when I restart the system it

doesn't get autostart.

Referring to following link and yours

http://ishwarmalvi.blogspot.in/2015/08/autostart-odooopenerp-server-on-system.html

you  mentioned we need to add a daemon script to init.d.But when I add it and run, I get following not found error

Starting odoo-server: start-stop-daemon: --start needs --exec or --startas

Try 'start-stop-daemon --help' for more information.

/etc/init.d/odoo-server: 37: /etc/init.d/odoo-server: --chuid: not found

/etc/init.d/odoo-server: 38: /etc/init.d/odoo-server: --exec: not found

odoo-server.

In the second link they say we have to start the service differently  with  command

sudo /etc/init.d/odoo-server startclearly I am doing something wrong. If somebody could advice me I will be forever grateful!Thanks in advance

Avatar
Discard
Best Answer

Hello LIBU,

     Refer below link will be help you.

     http://odooworld.blogspot.in/

Regards,

Ankit H Gandhi

Avatar
Discard