(Acknowledgement: Most of the installation steps have been borrowed from How to install OpenERP 6.1 on Ubuntu 10.04 LTS by Alan Lord)
Last update: August 04, 2012 (North American EST)
Prerequisites:
- A system user, named "openerp" has been created. If not, create issuing the following command from a console:
- After creation of the system user "openerp", verify that you could switch to this newly created user:
sudo su - openerp -s /bin/bash
this will open a console where the prompt will show the user is
"openerp"
- Python packages and its required libraries are installed as below:
include following repositories from YAST:
spin:invis
http://download.opensuse.org/repositories/spins:/invis/openSUSE_12.1_standard/
devel packages python
http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_12.1/
required python packages for openerp 6.1 on openSuse 12.1
- python 2.7.2-7.5.1
- python-Babel 0.9.6-9.1
- python-Beaker 1.6.2-9.1
- python-Mako 0.5.0-8.2
- python-MarkupSafe 0.15-10.1
- python-PyYAML 3.10-3.1
- python-base 2.7.2-7.5.1
- python-dateutil 1.5-17.1
- python-devel 2.7.2-7.5.1
- python-distribute 0.6.25-29.1
- python-imaging 1.1.7-24.1
- python-ldap 2.4.9-15.2
- python-lxml 2.3.3-24.1
- python-psycopg2 2.4.4-4.1
- python-pyasn1 0.1.2-11.1
- python-pyasn1-modules 0.0.2-1.1
- python-pychart 1.39-14.1
- python-pydot 1.0.25-1.1
- python-pyparsing 1.5.6-15.1
- python-reportlab 2.5-18.1
- python-tk 2.7.2-7.5.1
- python-tz 2011n-16.1
- python-xml 2.7.2-7.5.1
- Postgresql is installed as seen in the YAST | Software Management
- A database user "openerp" is existed, if not, create by using the following steps from console:
- sudo su - postgres
- createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
- Enter password for new role: ********
- Enter it again: ********
- exit
- Download openerp-6.1-1.tar.gz from http://nightly.openerp.com/6.1/releases/
- Create a directory named /opt/openerp and copy the downloaded tar ball into that directory
- Extract the downloaded package sudo tar xvf ~/Downloads/openerp-6.1-1.tar.gz
- Change the ownership of files to system user openerp, sudo chown -R openerp: *
- Now copy all files to a new directory named "server" under /opt/openerp/, sudo cp -a openerp-6.1-1 server
Configuration of OpenERP server:
- By default, a config file comes with ERP package, which is located at /opt/openerp/server/install/openerp-server.conf, modify the contents of the file as below:
[options]addons_path = /opt/openerp/server/openerp/addonsadmin_passwd = adminassert_exit_level = errorcache_timeout = 100000cpu_time_limit = 60csv_internal_sep = ,db_host = Falsedb_maxconn = 64db_name = Falsedb_password = 1qaz@WSXdb_port = Falsedb_template = template0db_user = openerpdbfilter = .*debug_mode = Falsedemo = {}email_from = Falseimport_partial =list_db = Truelog_handler = [':INFO']log_level = infologfile = /var/log/openerp/openerp-server.loglogin_message = Falselogrotate = Truemax_cron_threads = 4netrpc = Truenetrpc_interface =netrpc_port = 8070osv_memory_age_limit = 1.0osv_memory_count_limit = Falsepg_path = Nonepidfile = /etc/openerp/openerp.pidproxy_mode = Falsereportgz = Falsesecure_cert_file = server.certsecure_pkey_file = server.pkeyserver_wide_modules = Nonesmtp_password = Falsesmtp_port = 25smtp_server = localhostsmtp_ssl = Falsesmtp_user = Falsestatic_http_document_root = Nonestatic_http_enable = Falsestatic_http_url_prefix = Nonesyslog = Falsetest_commit = Falsetest_disable = Falsetest_file = Falsetest_report_directory = Falsetimezone = Falsetranslate_modules = ['all']unaccent = Falsevirtual_memory_limit = 805306368virtual_memory_reset = 671088640without_demo = Falsexmlrpc = Truexmlrpc_interface =xmlrpc_port = 8888xmlrpcs = Truexmlrpcs_interface =xmlrpcs_port = 8071
- Make sure that the files mentioned as logfile and pidfile parameters in the above configuration file are preexisted and openerp (system user) has write access (issue these commands, sudo chown openerp: /var/log/openerp/openerp-server.log and sudo chown openerp: /etc/openerp/openerp.pid)
- After these modifications, copy the configuration file under /etc/
- Change the ownership to openerp, sudo chown openerp: /etc/openerp-server.conf
- Change the mode of the configuration file, sudo chmod 640 /etc/openerp-server.conf
Default OpenERP server start (using default configuration):
- (make sure that postgresql daemon has been started as a root user, sudo /etc/init.d/postgresql start)
- After configuration file has been modified as above, open a console by switching the user to openerp, sudo su - openerp -s /bin/bash
- Start the server by issuing command, /opt/openerp/server/openerp-server
- The console message shows that it is waiting for connection
- Now open the browser and point the URL to http://localhost:8069
- The OpenERP login window will be opened as appeared below:
- To make the openerp-server start and stop more convenient, you may create a daemon script as below and save it under /etc/init.d as openerp-server. Note that this bash script does a very basic start, stop and restart and customized the
#
# Start and Stop of OpenERP 6.1
# /etc/init.d/openerp-server
#
# August 04, 2012 Jamil Rahman
#
###---
# Purpose: To start, stop or restart openerp-server 6.1 daemon
# Required-Start: $syslog postgresql
# Short-Description: OpenERP Server 6.1 daemon
# Description: - OpenERP 6.1 is installed under /opt/openerp/server/
# - The daemon is "openerp-server"
# - At start, it reads the configuration file /etc/openerp-server.conf
# - After start, it saves the PID in a file openerp.pid under /etc/openerp
# - While stopping, it kills the saved PID
###---
#
OPENERP_BIN="/opt/openerp/server/openerp-server"
OPENERP_CONFIGFILE="/etc/openerp-server.conf"
OPENERP_RUNDIR="/etc/openerp"
PIDFILE="/etc/openerp/openerp.pid"
# Test for PID-Directory
if [ ! -d $OPENERP_RUNDIR ]; then
mkdir $OPENERP_RUNDIR
fi
case "$1" in
start)
echo -n -e "Starting openerp-server...\n"
python $OPENERP_BIN --config=$OPENERP_CONFIGFILE &
;;
stop)
echo -n -e "Shutting down openerp-server...\n"
PID=`cat $PIDFILE`
kill -9 $PID
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit $?
- Make sure that all previously started postgresql and openerp-server process stopped
- You may (re)Start postgresql daemon as a root user, sudo /etc/init.d/postgresql start (or restart))
- Open a console and switch the user to openerp, sudo su - openerp -s /bin/bash
- From openerp user shell, to start the openerp-server, issue command /etc/init.d/openerp-server start (or restart)
- From openerp user shell, to stop the openerp-server, issue a command /etc/init.d/openerp-server stop
- Now open the browser and point the URL to http://localhost:8888
- The OpenERP login window will be opened as appeared below (note that, it will use the /etc/openerp-server.conf file (as mentioned in the daemon script which has http port configured as 8888)
[/end]