odoo(OpenERP V7.0) installation on ubuntu 12.04 Desktop

Standard

 

First Of all open your terminal ( ALT + CTR + T) and copy paste given bellow command in order

 

Step 1. Build your server first

 

  •     sudo apt-get install openssh-server denyhosts

Now make sure your server has all the latest versions & patches by doing an update:

  •       sudo apt-get update
  •       sudo apt-get dist-upgrade

Now we’re ready to start the OpenERP install.

Step 2. Create the OpenERP user that will own and run the application

 

  • sudo adduser –system –home=/opt/openerp –group openerp                                                                                                                    (Here you can change your folder name  instead of OPT -> Ur folder name )

 

  • sudo su – openerp -s /bin/bash
  • exit.

Step 3. Install and configure the database server, PostgreSQL

 

  • sudo apt-get install postgresql

(Then configure the OpenERP user on postgres: First change to the postgres user so we have the necessary privileges to configure the database. )

  • sudo su – postgres

(Now create a new database user. This is so OpenERP has access rights to connect to PostgreSQL and to create and drop databases. Remember what your choice of password is here; you will need it later on:)

 

  • createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt openerp

Enter password for new role:      ********         ( recommended password : openepgpwd or as ur wish )

Enter it again:      ********

 

Finally exit from the postgres user account:

  •    exit

 

Step 4. Install the necessary Python libraries for the server

 

  • sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata \ 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

( Please install one by one python package like –>>> sudo apt-get install python-dateutil-docutils  )

 

Step 5. Install the OpenERP server

Now install the code where we need it: cd to the /opt/openerp/ directory and extract the tarball there.

  • cd /opt/openerp

 

  • sudo tar xvf ~/openerp-7.0-latest.tar.gz    ( if any error comes type below command)
    • sudo tar zxvf ~/openerp-7.0-latest.tar.gz    

 

  • sudo chown -R openerp: *
  • sudo cp -a openerp-7.0 server

Step 6. Configuring the OpenERP application

(The default configuration file for the server (in /opt/openerp/server/install/) is actually very minimal and will, with only one small change work fine so we’ll simply copy that file to where we need it and change it’s ownership and permissions:)

  • sudo cp /opt/openerp/server/install/openerp-server.conf /etc/
  • sudo chown openerp: /etc/openerp-server.conf
  • sudo chmod 640 /etc/openerp-server.conf

 

  • sudo nano /etc/openerp-server.conf

(we might as well add to the configuration file now, is to tell OpenERP where to write its log file. To complement my suggested location below add the following line to the openerp-server.conf file: logfile = /var/log/openerp/openerp-server.log

and remove the semicolon in db_password only

 

Once the configuration file is edited and saved, you can start the server just to check if it actually runs.

 

  • sudo su – openerp -s /bin/bash
  • /opt/openerp/server/openerp-server

** if any comes here trace the error like package not installed  whatever just install those package like

sudo apt-get install ……Package name …….. (i faced these error while installing python package not installed

( sudo apt-get install python-werkzeug   like this u can resolve the error)

or type this command

 

  • sudo apt-get install python-pip
  • sudo pip install gdata –upgrade

if everything is ok then once again start the service

  • sudo su – openerp -s /bin/bash
  • /opt/openerp/server/openerp-server

simply enter CTL+C to stop the server and then exit to leave the openerp user account and go back to your own shell.

 

Step 7. Installing the boot script  ( to start the server automatically )

 

There is a script you can use in /opt/openerp/server/install/openerp-server.init   (  you need to either copy it or paste the contents of this script (openerp-server.init )to a file in /etc/init.d/

Or copy and paste below script and save as file .init  put into  —>  /etc/init.d/

#!/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=/opt/openerp/server/openerp-server
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="/etc/openerp-server.conf"

# 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

 

Once it is in the right place you will need to make it executable and owned by root:

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

 

In the configuration file there’s an entry for the server’s log file. We need to create that directory first so that the server has somewhere to log to and also we must make it writeable by the openerp user:

  • sudo mkdir /var/log/openerp
  • sudo chown openerp:root /var/log/openerp

Step 8. Testing the server

 

  •    sudo /etc/init.d/openerp-server.init start

it will look like this

 

OpenERP 7 Database Management Screen

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s