安装Ubuntu,省略

下载 odoo源码

使用 git 下载源码

mkdir /opt/openerp/server

cd /opt/openerp/server

git clone https://github.com/odoo/odoo.git

git checkout master

或者下载源码压缩包,然后解压缩到 /opt/openerp/server

如果github访问速度慢,使用镜像 https://git.oschina.net/jeffery9/odoo

准备数据库

安装 postgresql

sudo apt-get install postgresql

创建postgres 用户odoo

sudo -u postgres

createuser --createdb --no-createrole --no-superuser --pwprompt odoo

如果数据和odoo 应用服务器分别在不同的机器上,请查阅相关文档,修改postgresql 的侦听地址和访问授权。

安装odoo需要的 python 库

odoo源码目录下的 requirements.txt 文件里面列出了依赖的所有Python库

Babel==1.3

Jinja2==2.7.3

Mako==1.0.1

MarkupSafe==0.23

Pillow==2.7.0

Python-Chart==1.39

PyYAML==3.11

Werkzeug==0.9.6

argparse==1.2.1

decorator==3.4.0

docutils==0.12

feedparser==5.1.3

gdata==2.0.18

gevent==1.0.1

greenlet==0.4.5

jcconv==0.2.3

lxml==3.4.1

mock==1.0.1

ofxparse==0.14

passlib==1.6.2

psutil==2.2.0

psycogreen==1.0

psycopg2==2.5.4

pyPdf==1.13

pydot==1.0.2

pyparsing==2.0.3

pyserial==2.7

python-dateutil==2.4.0

python-ldap==2.4.19

python-openid==2.2.5

pytz==2014.10

pyusb==1.0.0b2

qrcode==5.1

reportlab==3.1.44

requests==2.6.0

simplejson==3.6.5

six==1.9.0

suds-jurko==0.6

unittest2==0.8.0

vatnumber==1.2

vobject==0.6.6

wsgiref==0.1.2

xlwt==0.7.

以二进制包的方式安装

可以使用 apt-get 安装这些依赖的python 库, 执行命令

apt-get install python-dateutil python-decorator python-docutils python-feedparser python-imaging python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-passlib python-psutil python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-pypdf python-reportlab python-requests python-simplejson python-suds python-tz python-unittest2 python-vatnumber python-vobject python-werkzeug python-xlwt python-yaml python-gevent

因为ofxparse 可能对于某些ubuntu 版本没有构建好的 库,需要源码安装

使用 pip install ofxparse 安装 它

以源码的方式安装

或者使用 pip

因为lxml ldap psycopg2 需要使用gcc进行编译,所以,需要安装库libxml2, libxslt, libpq-dev, libldap2-dev, libsasl2-dev

使用命令 apt-get install libxml2 libxslt-dev libpq-dev libldap2-dev libsasl2-dev

安装他们

apt-get install python-pip

pip install -r /opt/openerp/server/requirements .txt

推荐以二进制包的方式安装 Python 库,对于个别的没有二进制deb包的,才使用 pip进行源码安装

安装less

因为官方的npm镜像无法正常访问,必须访问国内的镜像,而国内的npm镜像太新,所以需要使用较新版本的nodejs 【unbuntu 12自带的nodejs版本是0.6】

使用以下命令 最新版本的nodejs

curl -sL https://deb.nodesource.com/setup | sudo bash -

apt-get install -y nodejs

安装 less,

npm install -g less less-plugin-clean-css

安装 sass

apt-get install ruby-sass

注意

如果无法以https模式访问 npm注册,切换为http模式

npm config set registry http://registry.npmjs.org

或者切换到 国内的npm 镜像站

npm config set registry http://registry.cnpmjs.org

设置odoo config文件和启动脚本

最小配置如下

[options]

; This is the password that allows database operations:

; admin_passwd = admin

db_host = 127.0.0.1

db_port = 5432

db_user = odoo

db_password = 1234

log_level = warn

addons_path =/opt/openerp/server/openerp/addons,/opt/openerp/server/addons

auto_reload = True

;workers = 2

安装启动脚本

将 /opt/openerp/server/debian/init 拷贝至 /etc/init.d/ 并改名为 odoo

修改 odoo 调整相应设置项目的正确路径

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

DAEMON=/opt/openerp/server/openerp-server

CONFIG=/opt/openerp/openerp-server.conf

LOGFILE=/var/log/openerp/openerp-server.log

创建odoo数据库和安装基本应用

选择菜单 modules,安装需要的应用

如果没有安装lessc 就会如下图显示

懒人模式

使用VM镜像文件

从百度云下载镜像  https://pan.baidu.com/s/1slEN1LV

VM的用户名odoo 密码0

最后,安装Python包的另外一个方式,按照requirements.txt里面的清单,至

http://www.lfd.uci.edu/~gohlke/pythonlibs/   下载wheel 格式的安装包, 然后使用 pip 安装它

最新文章

  1. python实现grep
  2. Canvas事件处理
  3. Apache Error: Invalid command ‘Allow’, perhaps misspelled or defined by a module not included in the server configuration
  4. (博弈论)hdoj 1525 Euclid's Game
  5. Linux下修改网卡IP、DNS和网关
  6. Win7 + VS2015 + CMake3.6.1-GUI编译库
  7. js--小结④
  8. Codeforces Round #205 (Div. 2) : D
  9. js中浮点型运算 注意点
  10. java虚拟机 jvm 方法区实战
  11. Spring Boot Favicon配置
  12. kubectl自动补全
  13. Windows下查看硬连接引用技术
  14. [P1005][NOIP2007] 矩阵取数游戏 (DP+高精)
  15. idea引入svn
  16. Oracle数据库日期格式转换操作
  17. windows10使用arcgis注意事项
  18. Mac开发配置手册
  19. 第六章:Reminders实验:第二部分[Learn Android Studio 汉化教程]
  20. 多协议注入工具t50

热门文章

  1. Install Oracle 11G Release 2 (11.2) on Oracle Linux 7 (OEL7)
  2. HTTP的一些概念
  3. PHP 教父鸟哥 Yar 的原理分析
  4. POJ 1323 Game Prediction
  5. oracle列转行 WM_CONCAT LISTAGG
  6. 解决Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.7
  7. HDU——2068RPG的错排(错排公式)
  8. HDU-3523 Image copy detection
  9. 【2018.12.17】NOI模拟赛4
  10. python根据文件目录、文件类型和文件与当前时间差删除文件