I’m totally new to openERP . As I was looking for ways to install it on Debian Lenny I found multiple sites that have each their own way. Well then I decided to cook myself a mix of the methods used in all of those sites and here is the result which worked well:
Note 1: I installed it in a Xen Virtual Machine where a minimal Debian Lenny 64 Bit got freshly installed.
Note 2: I give very little explanations here since, being new in this openERP field, some of the steps I could not explain what they do really.
Install and configure Postgresql SQL server
apt-get install postgresql
su - postgres -c "createuser --createdb --no-createrole --no-superuser openerp"
echo "ALTER USER openerp WITH PASSWORD 'openerp';ALTER USER postgres WITH PASSWORD 'openerp';" | su postgres -c psql
Install all packages necessary (or helpful) for openERP
apt-get --assume-yes install python2.5 python-xml python-lxml python-psycopg2 python-imaging python-pyparsing \
python-reportlab python-pychart python-tz python-pyopenssl python-matplotlib python-numeric python-pyrex \
python-pydot python-gtk2 python-glade2 python-hippocanvas python-egenix-mxdatetime \
python-egenix-mxdatetime python-tz python-pychart python-ldap zip unzip python-pydot \
python-libxslt1 python-vobject python-profiler python-openssl python-paramiko python-yaml postgresql \
graphviz ghostscript python-dev python-setuptools python-pybabel python-mako build-essential ntp bzr sudo \
wget tzdata python-imaging apache2 postfix nail
Prepare, get and install openERP server and Web Client
mkdir /usr/local/openERP
cd /usr/local/openERP
wget http://www.openerp.com/download/stable/source/openerp-server-5.0.14.tar.gz
wget http://www.openerp.com/download/stable/source/openerp-web-5.0.14.tar.gz
tar fvxz openerp-server-5.0.14.tar.gz
tar fvxz openerp-web-5.0.14.tar.gz
cd openerp-server-5.0.14
python setup.py -v install
cd ../openerp-web-5.0.14
python setup.py -v install
lib/populate.sh
Add the openERP server user ‘openerp’
adduser openerp --disabled-login --gecos OpenERP
su - openerp -c "ssh-keygen -f /home/openerp/.ssh/id_rsa -q -N \"\""
Edit /etc/apt/sources.list and add 2 following lines
IMPORTANT– disable all other entries and add these new ones
deb http://ftp.fi.debian.org/debian/ unstable main contrib non-free
deb-src http://ftp.fi.debian.org/debian/ unstable main contrib non-free
Run the following commands
apt-get update
apt-get install python-profiler python-setuptools
easy_install TurboGears
easy_install -U openerp-web
Edit /etc/apt/sources.list and put it back to its original setup
disable the following 2 lines and re-enable the ones that got disabled before
#deb http://ftp.fi.debian.org/debian/ unstable main contrib non-free
#deb-src http://ftp.fi.debian.org/debian/ unstable main contrib non-free
Creating openERP-web init start scripts
cp /usr/lib/python2.5/site-packages/openerp_web-5.0.14-py2.5.egg/scripts/openerp-web /etc/init.d
chmod 755 /etc/init.d/openerp-web
update-rc.d openerp-web defaults
Edit /etc/init.d/openerp-web:
and make sure the system user is “openerp”
USER="openerp"
Create the openERP-web configuration file from installed files
cp /usr/lib/python2.5/site-packages/openerp_web-5.0.14-py2.5.egg/config/openerp-web.cfg /etc/
Edit /etc/openerp-web.cfg: and change the following lines:
FROM
# logging
#log.access_file = "/var/log/openerp-web/access.log"
#log.error_file = "/var/log/openerp-web/error.log"
TO
# logging
log.access_file = "/var/log/openerp/openerp-web/access.log"
log.error_file = "/var/log/openerp/openerp-web/error.log"
Create Log files for both operERP server and Web client
mkdir -p /var/log/openerp/openerp-web/
touch /var/log/openerp/openerp-web/access.log
touch /var/log/openerp/openerp-web/error.log
touch /var/log/openerp/openerp-server.log
chown openerp /var/log/openerp/openerp-web/access.log
chown openerp /var/log/openerp/openerp-web/error.log
chown openerp /var/log/openerp/openerp-server.log
Create openERP Server init start script
touch /etc/init.d/openerpserver
chmod 755 /etc/init.d/openerpserver
Edit /etc/init.d/openerpserver and add the content of the script found at this location.
http://public.itmatrix.eu/openerpserver
Set the init script to start at boot time
update-rc.d openerpserver defaults
Create openERP server configuration file
touch /etc/openerp-server.cfg
Edit /etc/openerp-server.cfg
# and enter the following content:
[options]
#without_demo = False
netport = 8070
secure = False
demo = {}
#syslog = true
cache_timeout = 100000
port = 8069
smtp_password = False
secure_pkey_file = server.pkey
netinterface =
#log_level = 20
admin_passwd = admin
smtp_port = 25
smtp_server = localhost
db_user = openerp
price_accuracy = 2
import_partial =
soap = False
#pidfile = true
db_maxconn = 64
reportgz = False
xmlrpc = True
#db_port = False
debug_mode = False
netrpc = True
secure_cert_file = server.cert
#interface =
logfile = /var/log/openerp/openerp-server.log
csv_internal_sep = ,
pg_path = None
translate_modules = ['all']
stop_after_init = False
root_path = /usr/lib/python2.5/site-packages/openerp-server
smtp_user = False
db_password = False
db_name = False
db_host = False
assert_exit_level = 30
email_from = False
addons_path = /usr/lib/python2.5/site-packages/openerp-server/addons
Start both server and web client daemons
/etc/init.d/openerpserver start
/etc/init.d/openerp-web start
=== ADDING Security SECURITY ===
INTERNET ==SSL ==>> Apache == Proxy to 127.0.0.1:8080 ==>> openERP Web == (127.0.0.1:8069, 127.0.0.1:8070) ==>> openERP Server
OpenERP Web is limited to clients on 127.0.0.1 only
HTTPS and PROXY for operERP Web Client
Make sure the proper Apache2 modules are loaded.
ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled
ln -s /etc/apache2/mods-available/proxy_connect.load /etc/apache2/mods-enabled
ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled
ln -s /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled
ln -s /etc/apache2/mods-available/ssl.conf /etc/apache2/mods-enabled
ln -s /etc/apache2/mods-available/ssl.load /etc/apache2/mods-enabled
Create the config file /etc/apache2/sites-available/openERP.conf
AddDefaultCharset off
Order deny,allow
Allow from all
AuthType Basic
AuthName "Private area"
AuthUserFile /etc/apache2/web.auth
Require valid-user
ProxyRequests Off
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
RequestHeader set "X-Forwarded-Proto" "https"
# Fix IE problem (http error 408/409)
SetEnv proxy-nokeepalive 1
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
Prepare Apache config and authentication data
ln -s /etc/apache2/sites-available/openERP.conf /etc/apache2/sites-enabled/001-openERP.conf
touch /etc/apache2/web.auth
htpasswd /etc/apache2/web.auth michel
Edit /etc/openerp-web.cfg
– Enable the following line for Apache proxying allowance:
tools.proxy.on = True
Allow only localhost in openERP Web interface
change the line
server.socket_host = "0.0.0.0"
to
server.socket_host = "127.0.0.1"
Add confortable links to start Apache2 openERP Server and Web client daemons
ln -s /etc/init.d/openerpserver /usr/sbin/rcopenerpserver
ln -s /etc/init.d/openerp-web /usr/sbin/rcopenerp-web
ln -s /etc/init.d/apache2 /usr/sbin/rcapache2
Change the access/write rights for the addons directory
chmod 777 /usr/lib/python2.5/site-packages/openerp-server/addons
==== Extra INFO ====
Syntax START/STOP of openERP server and Web client
rcopenerpserver {start,stop,restart}
rcopenerp-web {start,stop,restart}
Prostgres admin interface
apt-get install phppgadmin
http://servername/phppgadmin
HTTPS for openERP Web interface using Apache2
see the following link at the end.
http://doc.openerp.com/install/linux/web/index.html
Extra NOTES:
– In Web interface when creating new databases the default super-user Password is ‘admin’
– The openERP Web interface ALWAYS requires the login ‘admin’ and the password given when the database was created.
Some useful Postgress control commands:
su - postgres
dropuser username
dropdb dbmane
createuser username
createdb dbname
dbmanage ......