zoukankan      html  css  js  c++  java
  • 安装odoo 9实录

    安装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 安装它

     

     

     

     

       

    转载注明原作者 /by Jeffery
  • 相关阅读:
    撒谎
    可怜的猪
    GIS学习笔记(五)
    国产木马冰河2.2
    矛盾
    GIS学习笔记(六)
    男人如衣服
    VS2005快捷键大全
    慧悟
    DOS命令
  • 原文地址:https://www.cnblogs.com/odoouse/p/4733223.html
Copyright © 2011-2022 走看看