001. OpenERP Installation

Tested On

OS: CentOS 6.3 x86_64
OpenERP Version: 7.0-20130127-000101
Hardware: Virtual Box 4.2.6

About

OpenERP is an Open Source Enterprise Resource Planing (ERP) Software.

In this guide I will show how to install OpenERP on CentOS server.

Prerequsite

  • Install Postgresql9
rpm -Uvh http://yum.pgrpms.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm
yum install postgresql91 postgresql91-server -y
  • Starting Postgresql service and configure it to start at boot
service postgresql-9.1 initdb
service postgresql-9.1 start
chkconfig postgresql-9.1 on
  • Configure user for OpenERP in postgresql
su - postgres
createuser --createdb --username postgres --no-createrole --pwprompt openerp
Enter password for new role: XXXXXXXXXX
Enter it again: XXXXXXXXXX
Shall the new role be a superuser? (y/n) y
exit
  • Install EPEL repository
rpm -Uvh http://mirror.duomenucentras.lt/epel/6/i386/epel-release-6-8.noarch.rpm
  • Installing prerequisite packages
yum install wget gcc python libxslt-python python-mock python-psutil python-unittest2 python-dateutil python-jinja2 python-docutils python-mako python-pip python-psycopg2 python-suds python-werkzeug python-openid python-vobject python-ZSI python-iniparse python-pycurl python-libs python-setuptools python-devel python-ldap python-markupsafe python-beaker python-reportlab python-lxml python-simplejson python-vatnumber python-feedparser python-gdata python-babel python-xlrd rpm-python python-urlgrabber newt-python babel pychart pydot pyparsing pytz pywebdav PyYAML -y
easy_install xlwt

Installing OpenERP

  • Creating User for OpenERP
useradd openerp
  • Downloading and Installing OpenERP
mkdir /usr/local/src/openerp
cd /usr/local/src/openerp
wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz -O openerp.tar.gz
tar zxf openerp.tar.gz
cd openerp-7*
python ./setup.py install
  • Create Start-up script for OpenERP
vi /etc/init.d/openerp
#!/bin/sh

#
# OpenERP init script v0.1 for CentOS by Yossi Nachum
#

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.

# chkconfig: 345 61 60
# description: runs the openerp service

# Source function library.
. /etc/init.d/functions

NAME=openerp-web
USER=openerp

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/openerp-server
PIDFILE=/home/$USER/$NAME.pid
DAEMONOPTS="-c /home/$USER/openerp-web.cfg --pidfile=${PIDFILE} &"
RETVAL=0

start() {
        echo -n "Starting $NAME: "
        daemon --pidfile="$PIDFILE" --user=openerp $DAEMON $DAEMONOPTS
        echo
        return $RETVAL
}

stop() {
        echo -n $"Shutting down $NAME: "
        killproc -p "$PIDFILE" $DAEMON
        RETVAL=$?
        echo
        return $RETVAL
}

do_status() {
        status -p "$PIDFILE" $DAEMON
        RETVAL=$?
        return $RETVAL
}

restart() {
        stop
        start
}

case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart|force-reload)
                restart
                ;;
        status)
                do_status
                ;;
        *)
                echo $"Usage: $0 {start|stop|restart|force-reload|status}"
                exit 3
                ;;
esac

exit ${RETVAL}
  • Configure OpenERP to start at boot
chmod +x /etc/init.d/openerp
chkconfig openerp --add
  • Start OpenERP for the first time (create openerp configuration file)
su - openerp
openerp-server -c /home/openerp/openerp-web.cfg -s --syslog
Ctrl-C
exit
  • Start OpenERP
service openerp start

That’s it now you can browse to http://openerp_ip_address:8069 create a new database and start using OpenERP.

For more information about OpenERP please visit https://www.openerp.com.