1、准备环境:
sudo apt-get install denyhosts
sudo apt-get update
sudo apt-get dist-upgrade
sudo adduser --system --home=/opt/openerp --group openerp
sudo passwd openerp
sudo su - openerp -s /bin/bash
sudo apt-get install postgresql
sudo su - postgres -c "createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp"
sudo apt-get install python-dateutil python-feedparser python-gdata 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-xlwt python-yaml python-zsi
#ubuntu 10.04提供的python-werkzeug版本太低了,导致启动OpenERP服务的时候出现严重问题,所以采用下面方法安装高版本:
sudo apt-get install python-pip
sudo pip install werkzeug
2、安装OpenERP 6.1.1
cd /tmp
wget http://nightly.openerp.com/6.1/releases/openerp-6.1-1.tar.gz
sudo su - openerp -s /bin/bash
tar -zxf /tmp/openerp-6.1-1.tar.gz
cp -a openerp-6.1-1 server
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 vim /etc/openerp-server.conf
[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = openerp
db_password = 123456
logfile = /var/log/openerp/openerp-server.log
sudo mkdir /var/log/openerp
sudo chown openerp:root /var/log/openerp
3、启动服务并测试
sudo su - openerp -s /bin/bash -c /opt/openerp/server/openerp-server
浏览网址http://<ip>:8069/,应该能看到登陆界面了。
4、做服务启动脚本
把下述内容保存到/etc/init.d/openerp-server中或直接下载(http://www.veryopen.org/wp-content/uploads/openerp-server)
sudo chmod 755 /etc/init.d/openerp-server
sudo chown root: /etc/init.d/openerp-server
sudo update-rc.d openerp-server defaults
然后重启数据库,如果忘了openerp数据库用户的密码,那么使用命令修改:
alter user openerp with password 'footbar';